Skip to content

Comments

feat(server): label query metrics with dataset#1805

Open
leoyvens wants to merge 2 commits intomainfrom
leo/label-query-metrics-with-dataset
Open

feat(server): label query metrics with dataset#1805
leoyvens wants to merge 2 commits intomainfrom
leo/label-query-metrics-with-dataset

Conversation

@leoyvens
Copy link
Collaborator

Add dataset label dimension to all query metrics so operators can filter throughput, errors, and latency by dataset in observability dashboards.

Queries may reference multiple datasets, in which case the metric will be updated for each referenced dataset.

@leoyvens leoyvens requested a review from Theodus February 18, 2026 15:45
Add per-dataset dimension to all query metrics so operators can filter
throughput, errors, and latency by dataset in observability dashboards.

- Add `catalog_dataset_labels()` to extract unique `namespace/name` labels from the catalog
- Add `dataset` parameter to all `MetricsRegistry` recording methods
- Emit metrics once per referenced dataset for cross-dataset queries
- Label streaming counters (`active`, `started`, `completed`) with dataset key-values

Signed-off-by: Leonardo Yvens <leoyvens@gmail.com>
@leoyvens leoyvens force-pushed the leo/label-query-metrics-with-dataset branch from a5a064f to b772ef0 Compare February 18, 2026 15:46
@leoyvens leoyvens requested a review from fordN February 18, 2026 17:25
@leoyvens
Copy link
Collaborator Author

dataset here is namespace/name and then dataset_name is just the name.

Expose the dataset name without namespace prefix as a dedicated label to simplify metric queries and aggregations that don't need namespace context.

- Add `dataset_name` label alongside existing `dataset` (`namespace/name`) on all query metrics
- Introduce `dataset_kvs()` helper in `metrics.rs` to centralize both label construction
- Refactor metrics methods to accept `&HashReference` instead of `&str` for type safety
- Update `catalog_dataset_labels` to return `Vec<HashReference>` instead of `Vec<String>`

Signed-off-by: Leonardo Yvens <leoyvens@gmail.com>
@leoyvens leoyvens force-pushed the leo/label-query-metrics-with-dataset branch from 80d6b83 to 3585214 Compare February 18, 2026 17:29
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.

1 participant