Skip to content

Emit topic name in ingestion delay metrics#18509

Open
rseetham wants to merge 1 commit into
apache:masterfrom
rseetham:ingestion-metric-topic-name
Open

Emit topic name in ingestion delay metrics#18509
rseetham wants to merge 1 commit into
apache:masterfrom
rseetham:ingestion-metric-topic-name

Conversation

@rseetham
Copy link
Copy Markdown
Contributor

Include the Kafka topic name as part of the ingestion delay gauge metric name so that operators can distinguish metrics by topic when a table has multiple upstream streams.

  • Add setOrUpdatePartitionTopicGauge / removePartitionTopicGauge to AbstractMetrics, composing the metric name as ....
  • Update IngestionDelayTracker.createMetrics / removeMetrics to use the new topic-aware APIs, looking up the topic name from the StreamConfig.
  • Rename RealtimeTableDataManager.getHostedPartitionsGroupIds → getHostedConsumingPartitionsGroupIds to clarify that only CONSUMING segments are returned.
  • Add unit tests in AbstractMetricsTest and IngestionDelayTrackerTest covering the new APIs and verifying the topic name appears in the metric name.

Include the Kafka topic name as part of the ingestion delay gauge metric
name so that operators can distinguish metrics by topic when a table has
multiple upstream streams or when a topic is renamed.

- Add `setOrUpdatePartitionTopicGauge` / `removePartitionTopicGauge` to
  AbstractMetrics, composing the metric name as
  <gauge>.<table>.<partition>.<topic>.
- Update IngestionDelayTracker.createMetrics / removeMetrics to use the
  new topic-aware APIs, looking up the topic name from the StreamConfig.
- Rename RealtimeTableDataManager.getHostedPartitionsGroupIds →
  getHostedConsumingPartitionsGroupIds to clarify that only CONSUMING
  segments are returned.
- Add unit tests in AbstractMetricsTest and IngestionDelayTrackerTest
  covering the new APIs and verifying the topic name appears in the
  metric name.
Copy link
Copy Markdown
Contributor

@noob-se7en noob-se7en left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate of #18175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants