Skip to content

Commit 38ce43f

Browse files
vitkyrkaclaude
andauthored
cockroachdb: fix wrong/missing metrics in metadata.csv (DataDog#24461)
* cockroachdb: fix stale metric names in metadata.csv METRIC_MAP renames the six changefeed_*_hist_nanos raw metric families by dropping the _nanos suffix (e.g. changefeed.checkpoint_hist), but metadata.csv still listed the old _nanos-suffixed names for the bucket/count/sum rows, and had no entries for go.scheduler_latency. Add a test that runs without histogram_buckets_as_distributions, which is what surfaces the mismatch since the default instance bypasses classic bucket/count/sum submission entirely. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Add changelog entry for DataDog#24461 Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Remove unneeded changelog entry for DataDog#24461 metadata.csv is not shipped with the Agent, so no changelog entry is required for this change. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent c94a91f commit 38ce43f

2 files changed

Lines changed: 29 additions & 18 deletions

File tree

cockroachdb/metadata.csv

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ cockroachdb.changefeed.buffer_entries_mem.acquired.count,count,,,,Total amount o
314314
cockroachdb.changefeed.buffer_entries_mem.released.count,count,,,,Total amount of memory released by the entries after they have been emitted,0,cockroachdb,,
315315
cockroachdb.changefeed.buffer_pushback.count,count,,nanosecond,,Total time spent waiting while the buffer was full,0,cockroachdb,,
316316
cockroachdb.changefeed.bytes.messages_pushback.count,count,,nanosecond,,Total time spent throttled for bytes quota,0,cockroachdb,,
317-
cockroachdb.changefeed.checkpoint_hist_nanos.bucket,count,,nanosecond,,Time spent checkpointing changefeed progress,0,cockroachdb,,
318-
cockroachdb.changefeed.checkpoint_hist_nanos.count,count,,nanosecond,,Time spent checkpointing changefeed progress,0,cockroachdb,,
319-
cockroachdb.changefeed.checkpoint_hist_nanos.sum,count,,nanosecond,,Time spent checkpointing changefeed progress,0,cockroachdb,,
317+
cockroachdb.changefeed.checkpoint_hist.bucket,count,,nanosecond,,Time spent checkpointing changefeed progress,0,cockroachdb,,
318+
cockroachdb.changefeed.checkpoint_hist.count,count,,nanosecond,,Time spent checkpointing changefeed progress,0,cockroachdb,,
319+
cockroachdb.changefeed.checkpoint_hist.sum,count,,nanosecond,,Time spent checkpointing changefeed progress,0,cockroachdb,,
320320
cockroachdb.changefeed.checkpoint_progress,gauge,,,,The earliest timestamp of any changefeed's persisted checkpoint (values prior to this timestamp will never need to be re-emitted),0,cockroachdb,,
321321
cockroachdb.changefeed.cloudstorage_buffered_bytes,gauge,,,,The number of bytes buffered in cloudstorage sink files which have not been emitted yet,0,cockroachdb,,
322322
cockroachdb.changefeed.commit.latency,gauge,,nanosecond,,[OpenMetrics v1] Event commit latency: a difference between event MVCC timestamp and the time it was acknowledged by the downstream sink,0,cockroachdb,,
@@ -335,9 +335,9 @@ cockroachdb.changefeed.failures,count,,,,[OpenMetrics v1] Total number of change
335335
cockroachdb.changefeed.failures.count,count,,,,[OpenMetrics v2] Total number of changefeed jobs which have failed,0,cockroachdb,,
336336
cockroachdb.changefeed.filtered_messages.count,count,,,,Messages filtered out by all feeds. This count does not include the number of messages that may be filtered due to the range constraints.,0,cockroachdb,,
337337
cockroachdb.changefeed.flush.messages_pushback.count,count,,nanosecond,,Total time spent throttled for flush quota,0,cockroachdb,,
338-
cockroachdb.changefeed.flush_hist_nanos.bucket,count,,nanosecond,,Time spent flushing messages across all changefeeds,0,cockroachdb,,
339-
cockroachdb.changefeed.flush_hist_nanos.count,count,,nanosecond,,Time spent flushing messages across all changefeeds,0,cockroachdb,,
340-
cockroachdb.changefeed.flush_hist_nanos.sum,count,,nanosecond,,Time spent flushing messages across all changefeeds,0,cockroachdb,,
338+
cockroachdb.changefeed.flush_hist.bucket,count,,nanosecond,,Time spent flushing messages across all changefeeds,0,cockroachdb,,
339+
cockroachdb.changefeed.flush_hist.count,count,,nanosecond,,Time spent flushing messages across all changefeeds,0,cockroachdb,,
340+
cockroachdb.changefeed.flush_hist.sum,count,,nanosecond,,Time spent flushing messages across all changefeeds,0,cockroachdb,,
341341
cockroachdb.changefeed.flushed_bytes.count,count,,byte,,Bytes emitted by all feeds; maybe different from changefeed.emitted_bytes when compression is enabled,0,cockroachdb,,
342342
cockroachdb.changefeed.flushes.count,count,,,,Total flushes across all feeds,0,cockroachdb,,
343343
cockroachdb.changefeed.forwarded_resolved_messages.count,count,,,,Resolved timestamps forwarded from the change aggregator to the change frontier,0,cockroachdb,,
@@ -354,25 +354,25 @@ cockroachdb.changefeed.message_size_hist.bucket,count,,byte,,Message size histog
354354
cockroachdb.changefeed.message_size_hist.count,count,,byte,,Message size histogram,0,cockroachdb,,
355355
cockroachdb.changefeed.message_size_hist.sum,count,,byte,,Message size histogram,0,cockroachdb,,
356356
cockroachdb.changefeed.messages.messages_pushback.count,count,,nanosecond,,Total time spent throttled for messages quota,0,cockroachdb,,
357-
cockroachdb.changefeed.nprocs_consume_event_nanos.bucket,count,,nanosecond,,Total time spent waiting to add an event to the parallel consumer,0,cockroachdb,,
358-
cockroachdb.changefeed.nprocs_consume_event_nanos.count,count,,nanosecond,,Total time spent waiting to add an event to the parallel consumer,0,cockroachdb,,
359-
cockroachdb.changefeed.nprocs_consume_event_nanos.sum,count,,nanosecond,,Total time spent waiting to add an event to the parallel consumer,0,cockroachdb,,
360-
cockroachdb.changefeed.nprocs_flush_nanos.bucket,count,,nanosecond,,Total time spent idle waiting for the parallel consumer to flush,0,cockroachdb,,
361-
cockroachdb.changefeed.nprocs_flush_nanos.count,count,,nanosecond,,Total time spent idle waiting for the parallel consumer to flush,0,cockroachdb,,
362-
cockroachdb.changefeed.nprocs_flush_nanos.sum,count,,nanosecond,,Total time spent idle waiting for the parallel consumer to flush,0,cockroachdb,,
357+
cockroachdb.changefeed.nprocs_consume_event.bucket,count,,nanosecond,,Total time spent waiting to add an event to the parallel consumer,0,cockroachdb,,
358+
cockroachdb.changefeed.nprocs_consume_event.count,count,,nanosecond,,Total time spent waiting to add an event to the parallel consumer,0,cockroachdb,,
359+
cockroachdb.changefeed.nprocs_consume_event.sum,count,,nanosecond,,Total time spent waiting to add an event to the parallel consumer,0,cockroachdb,,
360+
cockroachdb.changefeed.nprocs_flush.bucket,count,,nanosecond,,Total time spent idle waiting for the parallel consumer to flush,0,cockroachdb,,
361+
cockroachdb.changefeed.nprocs_flush.count,count,,nanosecond,,Total time spent idle waiting for the parallel consumer to flush,0,cockroachdb,,
362+
cockroachdb.changefeed.nprocs_flush.sum,count,,nanosecond,,Total time spent idle waiting for the parallel consumer to flush,0,cockroachdb,,
363363
cockroachdb.changefeed.nprocs_in_flight,gauge,,,,Number of buffered events in the parallel consumer,0,cockroachdb,,
364-
cockroachdb.changefeed.parallel_io_queue_nanos.bucket,count,,nanosecond,,Time spent with outgoing requests to the sink waiting in queue due to inflight requests with conflicting keys,0,cockroachdb,,
365-
cockroachdb.changefeed.parallel_io_queue_nanos.count,count,,nanosecond,,Time spent with outgoing requests to the sink waiting in queue due to inflight requests with conflicting keys,0,cockroachdb,,
366-
cockroachdb.changefeed.parallel_io_queue_nanos.sum,count,,nanosecond,,Time spent with outgoing requests to the sink waiting in queue due to inflight requests with conflicting keys,0,cockroachdb,,
364+
cockroachdb.changefeed.parallel_io_queue.bucket,count,,nanosecond,,Time spent with outgoing requests to the sink waiting in queue due to inflight requests with conflicting keys,0,cockroachdb,,
365+
cockroachdb.changefeed.parallel_io_queue.count,count,,nanosecond,,Time spent with outgoing requests to the sink waiting in queue due to inflight requests with conflicting keys,0,cockroachdb,,
366+
cockroachdb.changefeed.parallel_io_queue.sum,count,,nanosecond,,Time spent with outgoing requests to the sink waiting in queue due to inflight requests with conflicting keys,0,cockroachdb,,
367367
cockroachdb.changefeed.queue_time.count,count,,nanosecond,,Time KV event spent waiting to be processed,0,cockroachdb,,
368368
cockroachdb.changefeed.running,gauge,,,,"[OpenMetrics v1 & v2] Number of currently running changefeeds, including sinkless",0,cockroachdb,,
369369
cockroachdb.changefeed.schema_registry.registrations.count,count,,,,Number of registration attempts with the schema registry,0,cockroachdb,,
370370
cockroachdb.changefeed.schema_registry.retry.count,count,,,,Number of retries encountered when sending requests to the schema registry,0,cockroachdb,,
371371
cockroachdb.changefeed.schemafeed.table_history_scans.count,count,,,,The number of table history scans during polling,0,cockroachdb,,
372372
cockroachdb.changefeed.schemafeed.table_metadata.count,count,,nanosecond,,Time blocked while verifying table metadata histories,0,cockroachdb,,
373-
cockroachdb.changefeed.sink_batch_hist_nanos.bucket,count,,nanosecond,,Time spent batched in the sink buffer before being flushed and acknowledged,0,cockroachdb,,
374-
cockroachdb.changefeed.sink_batch_hist_nanos.count,count,,nanosecond,,Time spent batched in the sink buffer before being flushed and acknowledged,0,cockroachdb,,
375-
cockroachdb.changefeed.sink_batch_hist_nanos.sum,count,,nanosecond,,Time spent batched in the sink buffer before being flushed and acknowledged,0,cockroachdb,,
373+
cockroachdb.changefeed.sink_batch_hist.bucket,count,,nanosecond,,Time spent batched in the sink buffer before being flushed and acknowledged,0,cockroachdb,,
374+
cockroachdb.changefeed.sink_batch_hist.count,count,,nanosecond,,Time spent batched in the sink buffer before being flushed and acknowledged,0,cockroachdb,,
375+
cockroachdb.changefeed.sink_batch_hist.sum,count,,nanosecond,,Time spent batched in the sink buffer before being flushed and acknowledged,0,cockroachdb,,
376376
cockroachdb.changefeed.sink_io_inflight,gauge,,,,The number of keys currently inflight as IO requests being sent to the sink,0,cockroachdb,,
377377
cockroachdb.changefeed.size_based_flushes.count,count,,,,Total size based flushes across all feeds,0,cockroachdb,,
378378
cockroachdb.clock.offset.meannanos,gauge,,nanosecond,,[OpenMetrics v1 & v2] Mean clock offset with other nodes in nanoseconds,0,cockroachdb,,
@@ -530,6 +530,9 @@ cockroachdb.exec.success.count,count,,request,,[OpenMetrics v2] Number of batch
530530
cockroachdb.exportrequest.delay.count,count,,,,Number of Export requests delayed due to concurrent requests.,0,cockroachdb,,
531531
cockroachdb.follower_reads.success_count.count,count,,,,Number of successful follower reads,0,cockroachdb,,
532532
cockroachdb.gcbytesage,gauge,,second,,[OpenMetrics v1 & v2] Cumulative age of non-live data in seconds,0,cockroachdb,,
533+
cockroachdb.go.scheduler_latency.bucket,count,,nanosecond,,Distribution of the time goroutines have spent in the Go runtime scheduler in a runnable state before actually running,0,cockroachdb,,
534+
cockroachdb.go.scheduler_latency.count,count,,nanosecond,,Distribution of the time goroutines have spent in the Go runtime scheduler in a runnable state before actually running,0,cockroachdb,,
535+
cockroachdb.go.scheduler_latency.sum,count,,nanosecond,,Distribution of the time goroutines have spent in the Go runtime scheduler in a runnable state before actually running,0,cockroachdb,,
533536
cockroachdb.gossip.bytes.received,count,,byte,,[OpenMetrics v1] Number of received gossip bytes,0,cockroachdb,,
534537
cockroachdb.gossip.bytes.received.count,count,,byte,,[OpenMetrics v2] Number of received gossip bytes,0,cockroachdb,,
535538
cockroachdb.gossip.bytes.sent,count,,byte,,[OpenMetrics v1] Number of sent gossip bytes,0,cockroachdb,,

cockroachdb/tests/test_e2e.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@
88
def test_metrics(dd_agent_check, instance):
99
aggregator = dd_agent_check(instance, rate=True)
1010
assert_metrics(aggregator)
11+
12+
13+
def test_metrics_classic_histograms(dd_agent_check, instance):
14+
# Without histogram_buckets_as_distributions, histograms submit classic bucket/count/sum metrics,
15+
# which exercises metadata.csv rows that `test_metrics` above never touches.
16+
classic_instance = {key: value for key, value in instance.items() if key != 'histogram_buckets_as_distributions'}
17+
aggregator = dd_agent_check(classic_instance, rate=True)
18+
assert_metrics(aggregator)

0 commit comments

Comments
 (0)