public class TelemetryReporter extends Object implements org.apache.kafka.common.metrics.MetricsReporter, org.apache.kafka.common.ClusterResourceListener, io.confluent.telemetry.api.events.EventEmitterProvider, org.apache.kafka.server.telemetry.ClientTelemetry
| Modifier and Type | Field and Description |
|---|---|
static String |
SELF_METRICS_DOMAIN |
static String |
SELF_METRICS_NAMESPACE |
static String |
TELEMETRY_REPORTER_ID_TAG |
| Constructor and Description |
|---|
TelemetryReporter() |
TelemetryReporter(io.confluent.telemetry.events.EventLoggerFactory eventLoggerFactory) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.kafka.server.telemetry.ClientTelemetryReceiver |
clientReceiver() |
void |
close()
Called when the metrics repository is closed.
|
void |
configure(Map<String,?> configs)
Note: we are assuming that these methods are invoked in the following order:
1.
|
void |
contextChange(org.apache.kafka.common.metrics.MetricsContext metricsContext) |
Emitter |
emitter() |
io.confluent.telemetry.api.events.EventEmitter |
eventEmitter() |
List<MetricsCollector> |
getCollectors() |
org.apache.kafka.common.metrics.Metrics |
getSelfMetrics() |
static List<String> |
getUsmMetricsIncludeList(boolean clientMetricsEnabled) |
void |
init(List<org.apache.kafka.common.metrics.KafkaMetric> metrics) |
void |
metricChange(org.apache.kafka.common.metrics.KafkaMetric metric)
This is called whenever a metric is added/registered
|
void |
metricRemoval(org.apache.kafka.common.metrics.KafkaMetric metric)
This is called whenever a metric is removed
|
void |
onRemoteConfigurationReceived(io.confluent.telemetry.config.v2.remote.RemoteConfiguration remoteConfig) |
void |
onUpdate(org.apache.kafka.common.ClusterResource clusterResource) |
Set<String> |
reconfigurableConfigs() |
void |
reconfigure(Map<String,?> newRawConfig) |
void |
validateReconfiguration(Map<String,?> configs) |
public static final String SELF_METRICS_DOMAIN
public static final String SELF_METRICS_NAMESPACE
public static final String TELEMETRY_REPORTER_ID_TAG
public TelemetryReporter()
public TelemetryReporter(io.confluent.telemetry.events.EventLoggerFactory eventLoggerFactory)
public void configure(Map<String,?> configs)
configure in interface org.apache.kafka.common.Configurablepublic void validateReconfiguration(Map<String,?> configs) throws org.apache.kafka.common.config.ConfigException
validateReconfiguration in interface org.apache.kafka.common.metrics.MetricsReportervalidateReconfiguration in interface org.apache.kafka.common.Reconfigurableorg.apache.kafka.common.config.ConfigExceptionpublic void reconfigure(Map<String,?> newRawConfig)
reconfigure in interface org.apache.kafka.common.metrics.MetricsReporterreconfigure in interface org.apache.kafka.common.Reconfigurablepublic Set<String> reconfigurableConfigs()
reconfigurableConfigs in interface org.apache.kafka.common.metrics.MetricsReporterreconfigurableConfigs in interface org.apache.kafka.common.Reconfigurablepublic void contextChange(org.apache.kafka.common.metrics.MetricsContext metricsContext)
contextChange in interface org.apache.kafka.common.metrics.MetricsReporterpublic List<MetricsCollector> getCollectors()
public org.apache.kafka.common.metrics.Metrics getSelfMetrics()
public void close()
close in interface AutoCloseableclose in interface org.apache.kafka.common.metrics.MetricsReporterpublic void onUpdate(org.apache.kafka.common.ClusterResource clusterResource)
onUpdate in interface org.apache.kafka.common.ClusterResourceListenerpublic void init(List<org.apache.kafka.common.metrics.KafkaMetric> metrics)
init in interface org.apache.kafka.common.metrics.MetricsReporterpublic void onRemoteConfigurationReceived(io.confluent.telemetry.config.v2.remote.RemoteConfiguration remoteConfig)
public void metricChange(org.apache.kafka.common.metrics.KafkaMetric metric)
metricChange in interface org.apache.kafka.common.metrics.MetricsReporterpublic void metricRemoval(org.apache.kafka.common.metrics.KafkaMetric metric)
metricRemoval in interface org.apache.kafka.common.metrics.MetricsReporterpublic static List<String> getUsmMetricsIncludeList(boolean clientMetricsEnabled)
public Emitter emitter()
public io.confluent.telemetry.api.events.EventEmitter eventEmitter()
eventEmitter in interface io.confluent.telemetry.api.events.EventEmitterProviderpublic org.apache.kafka.server.telemetry.ClientTelemetryReceiver clientReceiver()
clientReceiver in interface org.apache.kafka.server.telemetry.ClientTelemetry