public class KafkaMetricsContext extends Object implements MetricsContext
NAMESPACE| Constructor and Description |
|---|
KafkaMetricsContext(String namespace)
Create a MetricsContext with namespace, no service or client properties
|
KafkaMetricsContext(String namespace,
Map<String,?> contextLabels)
Create a MetricsContext with namespace, service or client properties
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
contextLabels()
Returns the labels for this metrics context.
|
public KafkaMetricsContext(String namespace)
namespace - value for _namespace keypublic KafkaMetricsContext(String namespace, Map<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 Map<String,String> contextLabels()
MetricsContextcontextLabels in interface MetricsContext