public class TelemetryReporter extends Object implements org.apache.kafka.common.metrics.MetricsReporter, org.apache.kafka.common.ClusterResourceListener, io.confluent.telemetry.api.events.EventEmitterProvider
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 |
---|---|
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() |
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.remote.v1.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.Configurable
public void validateReconfiguration(Map<String,?> configs) throws org.apache.kafka.common.config.ConfigException
validateReconfiguration
in interface org.apache.kafka.common.metrics.MetricsReporter
validateReconfiguration
in interface org.apache.kafka.common.Reconfigurable
org.apache.kafka.common.config.ConfigException
public void reconfigure(Map<String,?> newRawConfig)
reconfigure
in interface org.apache.kafka.common.metrics.MetricsReporter
reconfigure
in interface org.apache.kafka.common.Reconfigurable
public Set<String> reconfigurableConfigs()
reconfigurableConfigs
in interface org.apache.kafka.common.metrics.MetricsReporter
reconfigurableConfigs
in interface org.apache.kafka.common.Reconfigurable
public void contextChange(org.apache.kafka.common.metrics.MetricsContext metricsContext)
contextChange
in interface org.apache.kafka.common.metrics.MetricsReporter
public List<MetricsCollector> getCollectors()
public void close()
close
in interface AutoCloseable
close
in interface org.apache.kafka.common.metrics.MetricsReporter
public void onUpdate(org.apache.kafka.common.ClusterResource clusterResource)
onUpdate
in interface org.apache.kafka.common.ClusterResourceListener
public void init(List<org.apache.kafka.common.metrics.KafkaMetric> metrics)
init
in interface org.apache.kafka.common.metrics.MetricsReporter
public void onRemoteConfigurationReceived(io.confluent.telemetry.config.remote.v1.RemoteConfiguration remoteConfig)
public void metricChange(org.apache.kafka.common.metrics.KafkaMetric metric)
metricChange
in interface org.apache.kafka.common.metrics.MetricsReporter
public void metricRemoval(org.apache.kafka.common.metrics.KafkaMetric metric)
metricRemoval
in interface org.apache.kafka.common.metrics.MetricsReporter
public Emitter emitter()
public io.confluent.telemetry.api.events.EventEmitter eventEmitter()
eventEmitter
in interface io.confluent.telemetry.api.events.EventEmitterProvider