public class ChangeStreamMetrics
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description | 
|---|---|
| static Counter | ACTIVE_PARTITION_READ_COUNTCounter for the active partition reads during the execution of the Connector. | 
| static Counter | DATA_RECORD_COMMITTED_TO_EMITTED_0MS_TO_1000MS_COUNTCounter for record latencies [0, 1000) ms during the execution of the Connector. | 
| static Counter | DATA_RECORD_COMMITTED_TO_EMITTED_1000MS_TO_3000MS_COUNTCounter for record latencies [1000, 3000) ms during the execution of the Connector. | 
| static Counter | DATA_RECORD_COMMITTED_TO_EMITTED_3000MS_TO_INF_COUNTCounter for record latencies equal or above 3000ms during the execution of the Connector. | 
| static Counter | DATA_RECORD_COUNTCounter for the total number of data records identified during the execution of the Connector. | 
| static Counter | HEARTBEAT_RECORD_COUNTCounter for the total number of heartbeat records identified during the execution of the
 Connector. | 
| static Distribution | PARTITION_CREATED_TO_SCHEDULED_MSTime in milliseconds that a partition took to transition from  PartitionMetadata.State.CREATEDtoPartitionMetadata.State.SCHEDULED. | 
| static Counter | PARTITION_RECORD_COUNTCounter for the total number of partitions identified during the execution of the Connector. | 
| static Counter | PARTITION_RECORD_MERGE_COUNTCounter for the total number of partition merges identified during the execution of the
 Connector. | 
| static Counter | PARTITION_RECORD_SPLIT_COUNTCounter for the total number of partition splits / moves identified during the execution of the
 Connector. | 
| static Distribution | PARTITION_SCHEDULED_TO_RUNNING_MSTime in milliseconds that a partition took to transition from  PartitionMetadata.State.SCHEDULEDtoPartitionMetadata.State.RUNNING. | 
| static Counter | QUERY_COUNTCounter for the total number of queries issued during the execution of the Connector. | 
| Constructor and Description | 
|---|
| ChangeStreamMetrics()Constructs a ChangeStreamMetrics instance with the following metrics enabled by default. | 
| ChangeStreamMetrics(java.util.Set<MetricName> enabledMetrics)Constructs a ChangeStreamMetrics instance with the given metrics enabled. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | decActivePartitionReadCounter()Decrements the  ACTIVE_PARTITION_READ_COUNTby 1 if the metric is
 enabled. | 
| void | incActivePartitionReadCounter()Increments the  ACTIVE_PARTITION_READ_COUNTby 1 if the metric is
 enabled. | 
| void | incDataRecordCounter()Increments the  DATA_RECORD_COUNTby 1 if the metric is enabled. | 
| void | incHeartbeatRecordCount()Increments the  HEARTBEAT_RECORD_COUNTby 1 if the metric is
 enabled. | 
| void | incPartitionRecordCount()Increments the  PARTITION_RECORD_COUNTby 1 if the metric is
 enabled. | 
| void | incPartitionRecordMergeCount()Increments the  PARTITION_RECORD_MERGE_COUNTby 1 if the metric is
 enabled. | 
| void | incPartitionRecordSplitCount()Increments the  PARTITION_RECORD_SPLIT_COUNTby 1 if the metric is
 enabled. | 
| void | incQueryCounter()Increments the  QUERY_COUNTby 1 if the metric is enabled. | 
| void | updateDataRecordCommittedToEmitted(Duration duration) | 
| void | updatePartitionCreatedToScheduled(Duration duration)Adds measurement of an instance for the  PARTITION_CREATED_TO_SCHEDULED_MSif the metric is enabled. | 
| void | updatePartitionScheduledToRunning(Duration duration)Adds measurement of an instance for the  PARTITION_SCHEDULED_TO_RUNNING_MSif the metric is enabled. | 
public static final Counter PARTITION_RECORD_COUNT
public static final Counter PARTITION_RECORD_SPLIT_COUNT
public static final Counter PARTITION_RECORD_MERGE_COUNT
public static final Distribution PARTITION_CREATED_TO_SCHEDULED_MS
PartitionMetadata.State.CREATED to PartitionMetadata.State.SCHEDULED.public static final Distribution PARTITION_SCHEDULED_TO_RUNNING_MS
PartitionMetadata.State.SCHEDULED to PartitionMetadata.State.RUNNING.public static final Counter ACTIVE_PARTITION_READ_COUNT
public static final Counter DATA_RECORD_COUNT
public static final Counter QUERY_COUNT
public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_0MS_TO_1000MS_COUNT
public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_1000MS_TO_3000MS_COUNT
public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_3000MS_TO_INF_COUNT
public static final Counter HEARTBEAT_RECORD_COUNT
public ChangeStreamMetrics()
public ChangeStreamMetrics(java.util.Set<MetricName> enabledMetrics)
enabledMetrics - metrics to be enabled during the Connector executionpublic void incPartitionRecordCount()
PARTITION_RECORD_COUNT by 1 if the metric is
 enabled.public void incPartitionRecordSplitCount()
PARTITION_RECORD_SPLIT_COUNT by 1 if the metric is
 enabled.public void incPartitionRecordMergeCount()
PARTITION_RECORD_MERGE_COUNT by 1 if the metric is
 enabled.public void updatePartitionCreatedToScheduled(Duration duration)
PARTITION_CREATED_TO_SCHEDULED_MS if the metric is enabled.public void updatePartitionScheduledToRunning(Duration duration)
PARTITION_SCHEDULED_TO_RUNNING_MS if the metric is enabled.public void incActivePartitionReadCounter()
ACTIVE_PARTITION_READ_COUNT by 1 if the metric is
 enabled.public void decActivePartitionReadCounter()
ACTIVE_PARTITION_READ_COUNT by 1 if the metric is
 enabled.public void incDataRecordCounter()
DATA_RECORD_COUNT by 1 if the metric is enabled.public void incQueryCounter()
QUERY_COUNT by 1 if the metric is enabled.public void incHeartbeatRecordCount()
HEARTBEAT_RECORD_COUNT by 1 if the metric is
 enabled.public void updateDataRecordCommittedToEmitted(Duration duration)