public class KafkaMetricsContext extends java.lang.Object implements MetricsContext
NAMESPACE
Constructor and Description |
---|
KafkaMetricsContext(java.lang.String namespace)
Create a MetricsContext with namespace, no service or client properties
|
KafkaMetricsContext(java.lang.String namespace,
java.util.Map<java.lang.String,?> contextLabels)
Create a MetricsContext with namespace, service or client properties
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
contextLabels()
Returns the labels for this metrics context.
|
public KafkaMetricsContext(java.lang.String namespace)
namespace
- value for _namespace keypublic KafkaMetricsContext(java.lang.String namespace, java.util.Map<java.lang.String,?> contextLabels)
namespace
- value for _namespace keycontextLabels
- contextLabels additional entries to add to the context.
values will be converted to string using Object.toString()public java.util.Map<java.lang.String,java.lang.String> contextLabels()
MetricsContext
contextLabels
in interface MetricsContext