public class ConfluentMetricNamingConvention extends Object
Modifier and Type | Field and Description |
---|---|
static String |
KAFKA_METRICS_LIB |
static String |
YAMMER_METRICS_LIB |
Constructor and Description |
---|
ConfluentMetricNamingConvention() |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
cleanLabelNames(Map<String,String> raw)
Converts the label keys to snake_case.
|
static String |
convertCase(String raw)
Converts a tag/name to match the telemetry naming conventions by converting snake_case.
|
static MetricNamingStrategy<org.apache.kafka.common.MetricName> |
forKafkaMetrics(String domain,
boolean addOriginalName,
boolean addLibraryName) |
static MetricNamingStrategy<com.yammer.metrics.core.MetricName> |
forYammerMetrics(String domain,
boolean addOriginalName,
boolean addLibraryName) |
static String |
fullMetricName(String domain,
String group,
String name)
Creates a metric name given the domain, group, and name.
|
public static final String KAFKA_METRICS_LIB
public static final String YAMMER_METRICS_LIB
public static MetricNamingStrategy<org.apache.kafka.common.MetricName> forKafkaMetrics(String domain, boolean addOriginalName, boolean addLibraryName)
public static MetricNamingStrategy<com.yammer.metrics.core.MetricName> forYammerMetrics(String domain, boolean addOriginalName, boolean addLibraryName)
public static String convertCase(String raw)
Kafka metrics have tags/name in lower case separated by hyphens. Eg: total-errors Yammer metrics have tags/name in upper camelcase. Eg: TotalErrors Some KSQL metrics have weird casing where the metric name is a mix of upper case words separated by underscore along with lower case words separated by hyphen. Eg: PENDING_SHUTDOWN-queries
raw
- public static String fullMetricName(String domain, String group, String name)
io.confluent.kafka.server
io.confluent.kafka.producer/request_metrics/produce_request_time_ms