Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates doc on otel resource attributes promoted to labels #10685

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
35 changes: 35 additions & 0 deletions docs/sources/mimir/configure/configure-otel-collector.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,41 @@ service:
exporters: [..., prometheusremotewrite]
```

## Work with default OpenTelemetry labels

OpenTelemetry metrics use resource attributes to describe the set of characteristics associated with a given resource, or entity producing telemetry data. For example, a host resource might have multiple attributes, including an ID, an image, and a type.

To optimize the storage of and ability to query this data, Mimir automatically assigns the following OTel resource attributes as labels at the time of ingestion, with periods (`.`) replaced by underscores (`_`):

- `service.instance.id`
- `service.name`
- `service.namespace`
- `service.version`
- `cloud.availability_zone`
- `cloud region`
- `container.name`
- `deployment.environment.name`
- `k8s.cluster.name`
- `k8s.container.name`
- `k8s.cronjob.name`
- `k8s.daemonset.name`
- `k8s.deployment.name`
- `k8s.job.name`
- `k8s.namespace.name`
- `k8s.pod.name`
- `k8s.replicaset.name`
- `k8s.statefulset.name`

{{< admonition type="note" >}}
Some of these labels are mutually exclusive.
{{< /admonition >}}

Contact support to update this list.

Mimir stores additional OTel resource attributes in a separate series called `target_info`, which you can query using a join query or the Prometheus `info()` function. Refer to [Functions](https://prometheus.io/docs/prometheus/latest/querying/functions/) in the Prometheus documentation for more information.

To learn more about OpenTelemetry resource attributes, refer to [Resources](https://opentelemetry.io/docs/languages/js/resources/) in the OpenTelemetry documentation.

## Format considerations

We follow the official [OTLP Metric points to Prometheus](https://opentelemetry.io/docs/reference/specification/compatibility/prometheus_and_openmetrics/#otlp-metric-points-to-prometheus) specification.
Expand Down
Loading