Skip to content

feat(meta): add database_info metric for database id to name mapping#25231

Merged
arkbriar merged 1 commit intomainfrom
shunjie/add-database-info-metric
Apr 7, 2026
Merged

feat(meta): add database_info metric for database id to name mapping#25231
arkbriar merged 1 commit intomainfrom
shunjie/add-database-info-metric

Conversation

@arkbriar
Copy link
Copy Markdown
Contributor

@arkbriar arkbriar commented Apr 2, 2026

Summary

  • Add a new database_info info-style gauge metric with labels database_id and database_name
  • Enables PromQL joins to resolve database names for barrier metrics (e.g. meta_barrier_duration_seconds, all_barrier_nums) that only expose database_id
  • Refreshed every 60s alongside existing info metrics (relation_info, actor_info, etc.)

Test plan

  • cargo check -p risingwave_meta passes
  • Deploy and verify database_info metric is emitted with correct labels
  • Verify PromQL join: some_metric * on(database_id) group_left(database_name) database_info

🤖 Generated with Claude Code

@hzxa21
Copy link
Copy Markdown
Collaborator

hzxa21 commented Apr 2, 2026

@arkbriar do you need this to be on grafana? I don't see you updating the grafana dashboard. It is fine if you don't need it.

@arkbriar
Copy link
Copy Markdown
Contributor Author

arkbriar commented Apr 2, 2026

@arkbriar do you need this to be on grafana? I don't see you updating the grafana dashboard. It is fine if you don't need it.

I don't for now. We can add it later in another PR if necessary.

@arkbriar arkbriar force-pushed the shunjie/add-database-info-metric branch from c38021f to 90bf001 Compare April 6, 2026 06:32
@arkbriar arkbriar enabled auto-merge April 6, 2026 07:34
@arkbriar arkbriar force-pushed the shunjie/add-database-info-metric branch from 90bf001 to c2bcc52 Compare April 7, 2026 06:54
@xiangjinwu xiangjinwu changed the title feat(meta): add database_info metric for database id to name mapping feat(meta): add database_info metric for database id to name mapping Apr 7, 2026
Add a new `database_info` info-style gauge metric with labels
`database_id` and `database_name`, enabling PromQL joins to resolve
database names for barrier metrics that only expose `database_id`.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: shunjie.dsj <[email protected]>
@arkbriar arkbriar force-pushed the shunjie/add-database-info-metric branch from c2bcc52 to 8078da0 Compare April 7, 2026 09:51
@arkbriar arkbriar added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit d516915 Apr 7, 2026
35 of 36 checks passed
@arkbriar arkbriar deleted the shunjie/add-database-info-metric branch April 7, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants