Package io.debezium.metrics
Class Metrics
java.lang.Object
io.debezium.metrics.Metrics
- Direct Known Subclasses:
DatabaseHistoryMetrics
,PipelineMetrics
Base for metrics implementations.
- Author:
- Jiri Pechanec
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final ObjectName
private boolean
private static final int
private static final Duration
-
Constructor Summary
ModifierConstructorDescriptionprotected
Metrics
(CommonConnectorConfig connectorConfig, String contextName, boolean multiPartitionMode) protected
Metrics
(CdcSourceTaskContext taskContext, String contextName) protected
Metrics
(CdcSourceTaskContext taskContext, Map<String, String> tags) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectName
metricName
(String connectorType, String connectorName, String contextName) protected ObjectName
metricName
(String connectorType, Map<String, String> tags) Create a JMX metric name for the given metric.void
register()
Registers a metrics MBean into the platform MBean server.void
Unregisters a metrics MBean from the platform MBean server.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
REGISTRATION_RETRIES
private static final int REGISTRATION_RETRIES- See Also:
-
REGISTRATION_RETRY_DELAY
-
name
-
registered
private volatile boolean registered
-
-
Constructor Details
-
Metrics
-
Metrics
-
Metrics
protected Metrics(CommonConnectorConfig connectorConfig, String contextName, boolean multiPartitionMode)
-
-
Method Details
-
register
public void register()Registers a metrics MBean into the platform MBean server. The method is intentionally synchronized to prevent preemption between registration and unregistration. -
unregister
public void unregister()Unregisters a metrics MBean from the platform MBean server. The method is intentionally synchronized to prevent preemption between registration and unregistration. -
metricName
-
metricName
Create a JMX metric name for the given metric.- Returns:
- the JMX metric name
-