Class ChangeStreamMetrics

java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamMetrics
All Implemented Interfaces:
Serializable

public class ChangeStreamMetrics extends Object implements Serializable
Class to aggregate metrics related functionality.
See Also:
  • Field Details

    • PARTITION_RECORD_COUNT

      public static final Counter PARTITION_RECORD_COUNT
      Counter for the total number of partitions identified during the execution of the Connector.
    • PARTITION_RECORD_SPLIT_COUNT

      public static final Counter PARTITION_RECORD_SPLIT_COUNT
      Counter for the total number of partition splits / moves identified during the execution of the Connector.
    • PARTITION_RECORD_MERGE_COUNT

      public static final Counter PARTITION_RECORD_MERGE_COUNT
      Counter for the total number of partition merges identified during the execution of the Connector.
    • PARTITION_START_RECORD_COUNT

      public static final Counter PARTITION_START_RECORD_COUNT
      Counter for the total number of partition start records identified during the execution of the Connector.
    • PARTITION_END_RECORD_COUNT

      public static final Counter PARTITION_END_RECORD_COUNT
      Counter for the total number of partition end records identified during the execution of the Connector.
    • PARTITION_EVENT_RECORD_COUNT

      public static final Counter PARTITION_EVENT_RECORD_COUNT
      Counter for the total number of partition event records identified during the execution of the Connector.
    • PARTITION_CREATED_TO_SCHEDULED_MS

      public static final Distribution PARTITION_CREATED_TO_SCHEDULED_MS
      Time in milliseconds that a partition took to transition from PartitionMetadata.State.CREATED to PartitionMetadata.State.SCHEDULED.
    • PARTITION_SCHEDULED_TO_RUNNING_MS

      public static final Distribution PARTITION_SCHEDULED_TO_RUNNING_MS
      Time in milliseconds that a partition took to transition from PartitionMetadata.State.SCHEDULED to PartitionMetadata.State.RUNNING.
    • ACTIVE_PARTITION_READ_COUNT

      public static final Counter ACTIVE_PARTITION_READ_COUNT
      Counter for the active partition reads during the execution of the Connector.
    • DATA_RECORD_COUNT

      public static final Counter DATA_RECORD_COUNT
      Counter for the total number of data records identified during the execution of the Connector.
    • QUERY_COUNT

      public static final Counter QUERY_COUNT
      Counter for the total number of queries issued during the execution of the Connector.
    • DATA_RECORD_COMMITTED_TO_EMITTED_0MS_TO_1000MS_COUNT

      public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_0MS_TO_1000MS_COUNT
      Counter for record latencies [0, 1000) ms during the execution of the Connector.
    • DATA_RECORD_COMMITTED_TO_EMITTED_1000MS_TO_3000MS_COUNT

      public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_1000MS_TO_3000MS_COUNT
      Counter for record latencies [1000, 3000) ms during the execution of the Connector.
    • DATA_RECORD_COMMITTED_TO_EMITTED_3000MS_TO_INF_COUNT

      public static final Counter DATA_RECORD_COMMITTED_TO_EMITTED_3000MS_TO_INF_COUNT
      Counter for record latencies equal or above 3000ms during the execution of the Connector.
    • HEARTBEAT_RECORD_COUNT

      public static final Counter HEARTBEAT_RECORD_COUNT
      Counter for the total number of heartbeat records identified during the execution of the Connector.
  • Constructor Details

  • Method Details

    • incPartitionRecordCount

      public void incPartitionRecordCount()
      Increments the PARTITION_RECORD_COUNT by 1 if the metric is enabled.
    • incPartitionRecordSplitCount

      public void incPartitionRecordSplitCount()
      Increments the PARTITION_RECORD_SPLIT_COUNT by 1 if the metric is enabled.
    • incPartitionRecordMergeCount

      public void incPartitionRecordMergeCount()
      Increments the PARTITION_RECORD_MERGE_COUNT by 1 if the metric is enabled.
    • incPartitionStartRecordCount

      public void incPartitionStartRecordCount()
      Increments the PARTITION_START_RECORD_COUNT by 1 if the metric is enabled.
    • incPartitionEndRecordCount

      public void incPartitionEndRecordCount()
      Increments the PARTITION_END_RECORD_COUNT by 1 if the metric is enabled.
    • incPartitionEventRecordCount

      public void incPartitionEventRecordCount()
      Increments the PARTITION_END_RECORD_COUNT by 1 if the metric is enabled.
    • updatePartitionCreatedToScheduled

      public void updatePartitionCreatedToScheduled(Duration duration)
      Adds measurement of an instance for the PARTITION_CREATED_TO_SCHEDULED_MS if the metric is enabled.
    • updatePartitionScheduledToRunning

      public void updatePartitionScheduledToRunning(Duration duration)
      Adds measurement of an instance for the PARTITION_SCHEDULED_TO_RUNNING_MS if the metric is enabled.
    • incActivePartitionReadCounter

      public void incActivePartitionReadCounter()
      Increments the ACTIVE_PARTITION_READ_COUNT by 1 if the metric is enabled.
    • decActivePartitionReadCounter

      public void decActivePartitionReadCounter()
      Decrements the ACTIVE_PARTITION_READ_COUNT by 1 if the metric is enabled.
    • incDataRecordCounter

      public void incDataRecordCounter()
      Increments the DATA_RECORD_COUNT by 1 if the metric is enabled.
    • incQueryCounter

      public void incQueryCounter()
      Increments the QUERY_COUNT by 1 if the metric is enabled.
    • incHeartbeatRecordCount

      public void incHeartbeatRecordCount()
      Increments the HEARTBEAT_RECORD_COUNT by 1 if the metric is enabled.
    • updateDataRecordCommittedToEmitted

      public void updateDataRecordCommittedToEmitted(Duration duration)