http.client.request.duration — that line often aggregates measurements coming from multiple sources. Dimensions (also called attributes or labels) are key-value pairs attached to each metric data point. They let you split, filter, and group an aggregated metric into meaningful time series so you can investigate and act on what matters.
Consider two calls that use the same metric name but originate from different services:
cart-servicecalledapi.payments.comand returned quickly (245 ms).notification-servicecalledapi.email.example.comand was slow (5.12 s).
service.name and the single aggregated line becomes two lines — one for cart-service and one for notification-service — making it obvious which service is experiencing higher latency or variability.

user.id attribute in both examples. While it could be useful for certain analyses, attributes like raw user identifiers are high-cardinality and can drastically increase the number of unique time series, complicating queries and increasing storage and cost.
A dimension (attribute) provides context to a metric data point as a key-value pair. That context enables:
- Filtering the metric data to focus on a subset (for example, one service or one server).
- Grouping to form multiple time series from one metric (for example, one time series per
service.name). - Building dashboards that present richer perspectives by combining multiple dimensions.

service.name, server.address, http.response.status_code, or other attributes to quickly localize the issue.

| Operation | Purpose | Example |
|---|---|---|
| Filter | Narrow metric data to a subset for focused inspection | service.name = "cart-service" |
| Group / Split | Produce multiple time series from one metric for comparison | group by service.name |
| Aggregate | Compute summaries across groups (sum, avg, p99) | avg(http.client.request.duration) by server.address |
| Annotate / Tag | Add context for dashboards and alerts | http.response.status_code = "500" |
- Choose stable, meaningful keys (e.g.,
service.name,region,env). - Avoid high-cardinality attributes (raw
user.id, request paths with IDs) on frequently queried metrics. - Use dimensions to narrow the scope of queries and reduce costs without losing actionable context.
- Follow naming and semantic conventions (e.g., OpenTelemetry attribute names) for consistency across tools.
Use dimensions that assist analysis but avoid introducing unnecessary high-cardinality attributes (like raw user IDs) into frequently queried metrics. High cardinality increases storage, query complexity, and cost.
- OpenTelemetry Metrics specification
- Observability best practices
- Prometheus relabeling and labels guide