Class SpannerStreamingChangeEventSourceMetrics
java.lang.Object
io.debezium.metrics.Metrics
io.debezium.pipeline.metrics.PipelineMetrics<P>
io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics<SpannerPartition>
io.debezium.connector.spanner.metrics.jmx.SpannerStreamingChangeEventSourceMetrics
- All Implemented Interfaces:
SpannerMetricsMXBean,io.debezium.pipeline.metrics.ChangeEventSourceMetrics<SpannerPartition>,io.debezium.pipeline.metrics.ChangeEventSourceMetricsMXBean,io.debezium.pipeline.metrics.StreamingChangeEventSourceMetrics<SpannerPartition>,io.debezium.pipeline.metrics.StreamingChangeEventSourceMetricsMXBean,io.debezium.pipeline.metrics.traits.CommonEventMetricsMXBean,io.debezium.pipeline.metrics.traits.ConnectionMetricsMXBean,io.debezium.pipeline.metrics.traits.QueueMetricsMXBean,io.debezium.pipeline.metrics.traits.SchemaMetricsMXBean,io.debezium.pipeline.metrics.traits.StreamingMetricsMXBean,io.debezium.pipeline.source.spi.DataChangeEventListener<SpannerPartition>,io.debezium.pipeline.source.spi.StreamingProgressListener
public class SpannerStreamingChangeEventSourceMetrics
extends io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics<SpannerPartition>
implements SpannerMetricsMXBean
Implementation of metrics related to the streaming phase of the Spanner connector
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final JsonSerializerprivate static final Stringprivate final SpannerMeterprivate static final StringFields inherited from class io.debezium.pipeline.metrics.PipelineMetrics
metadataProvider, taskContext -
Constructor Summary
ConstructorsConstructorDescriptionSpannerStreamingChangeEventSourceMetrics(SpannerSourceTaskContext taskContext, io.debezium.connector.base.ChangeEventQueueMetrics changeEventQueueMetrics, io.debezium.pipeline.source.spi.EventMetadataProvider metadataProvider, SpannerMeter spannerMeter) -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method finishes the current taskOwn latency of the Spanner ConnectorThe delay which Spanner connector waits for the next Change Stream EventintThe total number of Runtime errorsSpanner commit to Connector emit latencySpanner commit to Kafka publish latencyConnector emit to Kafka publish latencyConnector read latency to Connector emit latencySpanner commit to Connector read latencyThe Total Latency of the Spanner ConnectorThe low watermark: The timestamp T at which we have already received records with timestamp < TThe low watermark converted to the number of milliseconds from the epoch of 1970-01-01T00:00:00ZThe difference between the current clock time and the low watermarkintThe number of active partitions in the current taskintThe total number of partitions detected by the current taskintThe total number of issued queries in the current taskThe time duration between requesting and receiving offsets from Kafka ConnectThe time difference between now and the start of the partitionintThe number of actual responses during the last Rebalance EventintThe number of expected responses during the last Rebalance EventlongintThe remaining capacity of the change stream event QueueintThe total capacity of the Spanner QueueintThe number of intervals waiting but not receiving Heartbeat records from the Spanner Change StreamintThe remaining capacity of the task state change event queueThe internal state of the taskUnique identifier for the current taskbooleanisLeader()Returns "true", if task is currently acting as a leadervoidonEvent(SpannerPartition partition, io.debezium.spi.schema.DataCollectionId source, io.debezium.pipeline.spi.OffsetContext offset, Object key, org.apache.kafka.connect.data.Struct value, io.debezium.data.Envelope.Operation operation) voidreset()voidThis method restarts the current taskMethods inherited from class io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics
connected, getCapturedTables, getLastTransactionId, getMilliSecondsBehindSource, getNumberOfCommittedTransactions, getSourceEventPosition, isConnected, onConnectorEventMethods inherited from class io.debezium.pipeline.metrics.PipelineMetrics
getCurrentQueueSizeInBytes, getLastEvent, getMaxQueueSizeInBytes, getMilliSecondsSinceLastEvent, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacity, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfEventsSeen, getTotalNumberOfUpdateEventsSeen, onErroneousEvent, onErroneousEvent, onFilteredEvent, onFilteredEventMethods inherited from class io.debezium.metrics.Metrics
metricName, metricName, register, unregisterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.pipeline.metrics.ChangeEventSourceMetrics
register, unregisterMethods inherited from interface io.debezium.pipeline.metrics.traits.CommonEventMetricsMXBean
getLastEvent, getMilliSecondsSinceLastEvent, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfEventsSeen, getTotalNumberOfUpdateEventsSeenMethods inherited from interface io.debezium.pipeline.metrics.traits.ConnectionMetricsMXBean
isConnectedMethods inherited from interface io.debezium.pipeline.source.spi.DataChangeEventListener
onErroneousEvent, onErroneousEvent, onFilteredEvent, onFilteredEventMethods inherited from interface io.debezium.pipeline.metrics.traits.QueueMetricsMXBean
getCurrentQueueSizeInBytes, getMaxQueueSizeInBytes, getQueueRemainingCapacity, getQueueTotalCapacityMethods inherited from interface io.debezium.pipeline.metrics.traits.SchemaMetricsMXBean
getCapturedTablesMethods inherited from interface io.debezium.pipeline.metrics.traits.StreamingMetricsMXBean
getLastTransactionId, getMilliSecondsBehindSource, getNumberOfCommittedTransactions, getSourceEventPosition
-
Field Details
-
TASK_ID_TAG
- See Also:
-
CONNECTOR_NAME_TAG
- See Also:
-
NOT_YET_CALCULATED
- See Also:
-
spannerMeter
-
jsonSerializer
-
-
Constructor Details
-
SpannerStreamingChangeEventSourceMetrics
public SpannerStreamingChangeEventSourceMetrics(SpannerSourceTaskContext taskContext, io.debezium.connector.base.ChangeEventQueueMetrics changeEventQueueMetrics, io.debezium.pipeline.source.spi.EventMetadataProvider metadataProvider, SpannerMeter spannerMeter)
-
-
Method Details
-
onEvent
public void onEvent(SpannerPartition partition, io.debezium.spi.schema.DataCollectionId source, io.debezium.pipeline.spi.OffsetContext offset, Object key, org.apache.kafka.connect.data.Struct value, io.debezium.data.Envelope.Operation operation) - Specified by:
onEventin interfaceio.debezium.pipeline.source.spi.DataChangeEventListener<SpannerPartition>- Overrides:
onEventin classio.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics<SpannerPartition>
-
reset
public void reset()- Specified by:
resetin interfaceio.debezium.pipeline.metrics.ChangeEventSourceMetricsMXBean- Overrides:
resetin classio.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics<SpannerPartition>
-
getLowWatermark
Description copied from interface:SpannerMetricsMXBeanThe low watermark: The timestamp T at which we have already received records with timestamp < T- Specified by:
getLowWatermarkin interfaceSpannerMetricsMXBean- Throws:
InterruptedException
-
getMilliSecondsLowWatermark
Description copied from interface:SpannerMetricsMXBeanThe low watermark converted to the number of milliseconds from the epoch of 1970-01-01T00:00:00Z- Specified by:
getMilliSecondsLowWatermarkin interfaceSpannerMetricsMXBean- Throws:
InterruptedException
-
getMilliSecondsLowWatermarkLag
Description copied from interface:SpannerMetricsMXBeanThe difference between the current clock time and the low watermark- Specified by:
getMilliSecondsLowWatermarkLagin interfaceSpannerMetricsMXBean- Throws:
InterruptedException
-
getNumberOfChangeStreamPartitionsDetected
public int getNumberOfChangeStreamPartitionsDetected()Description copied from interface:SpannerMetricsMXBeanThe total number of partitions detected by the current task- Specified by:
getNumberOfChangeStreamPartitionsDetectedin interfaceSpannerMetricsMXBean
-
getNumberOfChangeStreamQueriesIssuedTotal
public int getNumberOfChangeStreamQueriesIssuedTotal()Description copied from interface:SpannerMetricsMXBeanThe total number of issued queries in the current task- Specified by:
getNumberOfChangeStreamQueriesIssuedTotalin interfaceSpannerMetricsMXBean
-
getNumberOfActiveChangeStreamQueries
public int getNumberOfActiveChangeStreamQueries()Description copied from interface:SpannerMetricsMXBeanThe number of active partitions in the current task- Specified by:
getNumberOfActiveChangeStreamQueriesin interfaceSpannerMetricsMXBean
-
getStuckHeartbeatIntervals
public int getStuckHeartbeatIntervals()Description copied from interface:SpannerMetricsMXBeanThe number of intervals waiting but not receiving Heartbeat records from the Spanner Change Stream- Specified by:
getStuckHeartbeatIntervalsin interfaceSpannerMetricsMXBean
-
getDelayChangeStreamEventsLastMilliSeconds
Description copied from interface:SpannerMetricsMXBeanThe delay which Spanner connector waits for the next Change Stream Event- Specified by:
getDelayChangeStreamEventsLastMilliSecondsin interfaceSpannerMetricsMXBean
-
getDelayChangeStreamEventsP50MilliSeconds
- Specified by:
getDelayChangeStreamEventsP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getDelayChangeStreamEventsP95MilliSeconds
- Specified by:
getDelayChangeStreamEventsP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getDelayChangeStreamEventsP99MilliSeconds
- Specified by:
getDelayChangeStreamEventsP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getErrorCount
public int getErrorCount()Description copied from interface:SpannerMetricsMXBeanThe total number of Runtime errors- Specified by:
getErrorCountin interfaceSpannerMetricsMXBean
-
getTaskSyncContext
Description copied from interface:SpannerMetricsMXBeanThe internal state of the task- Specified by:
getTaskSyncContextin interfaceSpannerMetricsMXBean
-
getTaskUid
Description copied from interface:SpannerMetricsMXBeanUnique identifier for the current task- Specified by:
getTaskUidin interfaceSpannerMetricsMXBean
-
getLatencyLowWatermarkLagMinMilliSeconds
- Specified by:
getLatencyLowWatermarkLagMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyLowWatermarkLagMaxMilliSeconds
- Specified by:
getLatencyLowWatermarkLagMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyLowWatermarkLagAvgMilliSeconds
- Specified by:
getLatencyLowWatermarkLagAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyLowWatermarkLagP50MilliSeconds
- Specified by:
getLatencyLowWatermarkLagP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyLowWatermarkLagP95MilliSeconds
- Specified by:
getLatencyLowWatermarkLagP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyLowWatermarkLagP99MilliSeconds
- Specified by:
getLatencyLowWatermarkLagP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyTotalMinMilliSeconds
Description copied from interface:SpannerMetricsMXBeanThe Total Latency of the Spanner Connector- Specified by:
getLatencyTotalMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyTotalMaxMilliSeconds
- Specified by:
getLatencyTotalMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyTotalAvgMilliSeconds
- Specified by:
getLatencyTotalAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyTotalP50MilliSeconds
- Specified by:
getLatencyTotalP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyTotalP95MilliSeconds
- Specified by:
getLatencyTotalP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyTotalP99MilliSeconds
- Specified by:
getLatencyTotalP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencySpannerMinMilliSeconds
Description copied from interface:SpannerMetricsMXBeanSpanner commit to Connector read latency- Specified by:
getLatencySpannerMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencySpannerMaxMilliSeconds
- Specified by:
getLatencySpannerMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencySpannerAvgMilliSeconds
- Specified by:
getLatencySpannerAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencySpannerP50MilliSeconds
- Specified by:
getLatencySpannerP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencySpannerP95MilliSeconds
- Specified by:
getLatencySpannerP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencySpannerP99MilliSeconds
- Specified by:
getLatencySpannerP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyReadToEmitMinMilliSeconds
Description copied from interface:SpannerMetricsMXBeanConnector read latency to Connector emit latency- Specified by:
getLatencyReadToEmitMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyReadToEmitMaxMilliSeconds
- Specified by:
getLatencyReadToEmitMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyReadToEmitAvgMilliSeconds
- Specified by:
getLatencyReadToEmitAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyReadToEmitP50MilliSeconds
- Specified by:
getLatencyReadToEmitP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyReadToEmitP95MilliSeconds
- Specified by:
getLatencyReadToEmitP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyReadToEmitP99MilliSeconds
- Specified by:
getLatencyReadToEmitP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToEmitMinMilliSeconds
Description copied from interface:SpannerMetricsMXBeanSpanner commit to Connector emit latency- Specified by:
getLatencyCommitToEmitMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToEmitMaxMilliSeconds
- Specified by:
getLatencyCommitToEmitMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToEmitAvgMilliSeconds
- Specified by:
getLatencyCommitToEmitAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToEmitP50MilliSeconds
- Specified by:
getLatencyCommitToEmitP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToEmitP95MilliSeconds
- Specified by:
getLatencyCommitToEmitP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToEmitP99MilliSeconds
- Specified by:
getLatencyCommitToEmitP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToPublishMinMilliSeconds
Description copied from interface:SpannerMetricsMXBeanSpanner commit to Kafka publish latency- Specified by:
getLatencyCommitToPublishMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToPublishMaxMilliSeconds
- Specified by:
getLatencyCommitToPublishMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToPublishAvgMilliSeconds
- Specified by:
getLatencyCommitToPublishAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToPublishP50MilliSeconds
- Specified by:
getLatencyCommitToPublishP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToPublishP95MilliSeconds
- Specified by:
getLatencyCommitToPublishP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyCommitToPublishP99MilliSeconds
- Specified by:
getLatencyCommitToPublishP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyEmitToPublishMinMilliSeconds
Description copied from interface:SpannerMetricsMXBeanConnector emit to Kafka publish latency- Specified by:
getLatencyEmitToPublishMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyEmitToPublishMaxMilliSeconds
- Specified by:
getLatencyEmitToPublishMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyEmitToPublishAvgMilliSeconds
- Specified by:
getLatencyEmitToPublishAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyEmitToPublishP50MilliSeconds
- Specified by:
getLatencyEmitToPublishP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyEmitToPublishP95MilliSeconds
- Specified by:
getLatencyEmitToPublishP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getLatencyEmitToPublishP99MilliSeconds
- Specified by:
getLatencyEmitToPublishP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getDebugLatencyOwnConnectorMinMilliSeconds
Description copied from interface:SpannerMetricsMXBeanOwn latency of the Spanner Connector- Specified by:
getDebugLatencyOwnConnectorMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getDebugLatencyOwnConnectorMaxMilliSeconds
- Specified by:
getDebugLatencyOwnConnectorMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getDebugLatencyOwnConnectorAvgMilliSeconds
- Specified by:
getDebugLatencyOwnConnectorAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getDebugLatencyOwnConnectorLastMilliSeconds
- Specified by:
getDebugLatencyOwnConnectorLastMilliSecondsin interfaceSpannerMetricsMXBean
-
getDebugLatencyOwnConnectorP50MilliSeconds
- Specified by:
getDebugLatencyOwnConnectorP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getDebugLatencyOwnConnectorP95MilliSeconds
- Specified by:
getDebugLatencyOwnConnectorP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getDebugLatencyOwnConnectorP99MilliSeconds
- Specified by:
getDebugLatencyOwnConnectorP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getPartitionOffsetLagMinMilliSeconds
Description copied from interface:SpannerMetricsMXBeanThe time difference between now and the start of the partition- Specified by:
getPartitionOffsetLagMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getPartitionOffsetLagMaxMilliSeconds
- Specified by:
getPartitionOffsetLagMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getPartitionOffsetLagAvgMilliSeconds
- Specified by:
getPartitionOffsetLagAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getPartitionOffsetLagP50MilliSeconds
- Specified by:
getPartitionOffsetLagP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getPartitionOffsetLagP95MilliSeconds
- Specified by:
getPartitionOffsetLagP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getPartitionOffsetLagP99MilliSeconds
- Specified by:
getPartitionOffsetLagP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getPartitionOffsetLagLastMilliSeconds
- Specified by:
getPartitionOffsetLagLastMilliSecondsin interfaceSpannerMetricsMXBean
-
getOffsetReceivingTimeMinMilliSeconds
Description copied from interface:SpannerMetricsMXBeanThe time duration between requesting and receiving offsets from Kafka Connect- Specified by:
getOffsetReceivingTimeMinMilliSecondsin interfaceSpannerMetricsMXBean
-
getOffsetReceivingTimeMaxMilliSeconds
- Specified by:
getOffsetReceivingTimeMaxMilliSecondsin interfaceSpannerMetricsMXBean
-
getOffsetReceivingTimeAvgMilliSeconds
- Specified by:
getOffsetReceivingTimeAvgMilliSecondsin interfaceSpannerMetricsMXBean
-
getOffsetReceivingTimeP50MilliSeconds
- Specified by:
getOffsetReceivingTimeP50MilliSecondsin interfaceSpannerMetricsMXBean
-
getOffsetReceivingTimeP95MilliSeconds
- Specified by:
getOffsetReceivingTimeP95MilliSecondsin interfaceSpannerMetricsMXBean
-
getOffsetReceivingTimeP99MilliSeconds
- Specified by:
getOffsetReceivingTimeP99MilliSecondsin interfaceSpannerMetricsMXBean
-
getOffsetReceivingTimeLastMilliSeconds
- Specified by:
getOffsetReceivingTimeLastMilliSecondsin interfaceSpannerMetricsMXBean
-
getSpannerEventQueueTotalCapacity
public int getSpannerEventQueueTotalCapacity()Description copied from interface:SpannerMetricsMXBeanThe total capacity of the Spanner Queue- Specified by:
getSpannerEventQueueTotalCapacityin interfaceSpannerMetricsMXBean
-
getTaskStateChangeEventQueueRemainingCapacity
public int getTaskStateChangeEventQueueRemainingCapacity()Description copied from interface:SpannerMetricsMXBeanThe remaining capacity of the task state change event queue- Specified by:
getTaskStateChangeEventQueueRemainingCapacityin interfaceSpannerMetricsMXBean
-
getSpannerEventQueueRemainingCapacity
public int getSpannerEventQueueRemainingCapacity()Description copied from interface:SpannerMetricsMXBeanThe remaining capacity of the change stream event Queue- Specified by:
getSpannerEventQueueRemainingCapacityin interfaceSpannerMetricsMXBean
-
isLeader
public boolean isLeader()Description copied from interface:SpannerMetricsMXBeanReturns "true", if task is currently acting as a leader- Specified by:
isLeaderin interfaceSpannerMetricsMXBean
-
getRebalanceGenerationId
public long getRebalanceGenerationId()- Specified by:
getRebalanceGenerationIdin interfaceSpannerMetricsMXBean
-
getRebalanceAnswersActual
public int getRebalanceAnswersActual()Description copied from interface:SpannerMetricsMXBeanThe number of actual responses during the last Rebalance Event- Specified by:
getRebalanceAnswersActualin interfaceSpannerMetricsMXBean
-
getRebalanceAnswersExpected
public int getRebalanceAnswersExpected()Description copied from interface:SpannerMetricsMXBeanThe number of expected responses during the last Rebalance Event- Specified by:
getRebalanceAnswersExpectedin interfaceSpannerMetricsMXBean
-
finishTask
public void finishTask()Description copied from interface:SpannerMetricsMXBeanThis method finishes the current task- Specified by:
finishTaskin interfaceSpannerMetricsMXBean
-
restartTask
public void restartTask()Description copied from interface:SpannerMetricsMXBeanThis method restarts the current task- Specified by:
restartTaskin interfaceSpannerMetricsMXBean
-