Dash0 Acquires Lumigo to Expand Agentic Observability Across AWS and Serverless

Last updated: March 18, 2026

Understand OpenTelemetry Metric Names and Labels

Comprehensive guide to using OpenTelemetry metrics with PromQL, explaining metric naming conventions, query building, and best practices for effective monitoring and analysis of telemetry data.

Because Dash0 is OpenTelemetry-native, metric names are stored and queried differently from a traditional Prometheus setup. Understanding the distinction between otel_metric_name and the translated Prometheus name avoids a common class of PromQL errors.

Dual Naming: OpenTelemetry and Prometheus

When OpenTelemetry metrics are sent to Dash0, they maintain their original names while also being exposed with Prometheus-compatible names according to the OpenTelemetry specification. This dual-naming approach gives you flexibility in how you query your data.

For example, an OpenTelemetry metric named k8s.pod.memory.working_set is also exposed in Prometheus format as k8s_pod_memory_working_set_bytes. Both names refer to the same underlying metric data, and you can use either in your queries.

The otel_metric_name Attribute

Every metric ingested by Dash0 carries a special otel_metric_name label that holds the original OpenTelemetry metric name — for example, app.ads.ad_requests or dash0.logs. This attribute is not sent by your instrumentation; Dash0 derives it from the metric's own identity metadata (alongside otel_metric_type and otel_metric_unit).

Using otel_metric_name in a PromQL selector is the recommended approach for most users:

promql
1
increase({otel_metric_name="app.ads.ad_requests", otel_metric_type="sum"}[2m])

This works regardless of how the underlying metric name has been translated for Prometheus compatibility and stays stable even if the metric type or unit changes.

You can equivalently query using the Prometheus-compatible name directly:

promql
1
k8s_pod_memory_working_set_bytes{service_name="adservice"}

The easiest way to discover Prometheus-compatible names is the Query Builder's autocomplete — once you type a prefix, it shows all matching metric names.

PromQL editor's auto completion showing suggestions for Kubernetes pod memory metrics

The otel_metric_type and otel_metric_unit Attributes

Alongside otel_metric_name, Dash0 adds two more labels to every metric:

  • otel_metric_type — the OTLP data model type. Valid values are sum, gauge, histogram, exponential_histogram, and summary (always lowercase in PromQL).
  • otel_metric_unit — the unit declared in the metric definition (e.g., s, By, 1), if one was provided.

The table below maps each otel_metric_type value to its OTLP type, the OTel API instrument it corresponds to, and how it appears in the Metrics Explorer UI:

otel_metric_typeOTLP TypeOTel API InstrumentMetrics Explorer
sumSumCounter, UpDownCounterSUM
gaugeGaugeGaugeGAUGE
histogramHistogramHistogramHIST
exponential_histogramExponentialHistogramExponentialHistogramEXP HIST
summarySummarySUMMARY

Use otel_metric_type in PromQL to disambiguate metrics that share a name but differ in type:

promql
1
{otel_metric_name="app.frontend.requests", otel_metric_type="sum"}

The Prometheus Name Transformation

Prometheus requires metric names to match the pattern [a-zA-Z_:][a-zA-Z0-9_:]*. Dash0 applies the standardised OpenTelemetry-to-Prometheus mapping when exposing metrics via a Prometheus-compatible endpoint. The mapping applies these transformations:

  • Type suffixes are added (e.g. _total for counters).
  • Unit suffixes may be added (e.g. _seconds, _bytes).
  • Invalid characters (dots, hyphens) are replaced with underscores.
  • Multiple consecutive underscores are collapsed into one.

Note that in PromQL selectors, dots in label names are also replaced with underscores — for example, k8s.deployment.name becomes k8s_deployment_name.

Choosing Which Name to Use

SituationRecommendation
Writing new PromQL queries in Dash0Use otel_metric_name
Migrating queries from an existing Prometheus setupLook up the translated name via autocomplete, or convert manually
Querying Dash0's Prometheus-compatible scrape endpointUse the translated Prometheus name
Long-term stability (type or unit may change)Use otel_metric_name

Common Pitfall: Dots in Metric Names

A frequent error is using OpenTelemetry metric names directly as the PromQL metric selector without wrapping them in a label matcher. Dots are not valid in bare PromQL metric names and will cause a parse error:

promql
12
# Error: unexpected character '.'
jvm.memory.used.bytes{service.name="catalog", jvm.memory.type="heap"}

Fix this by using otel_metric_name or the Prometheus-compatible translated name:

promql
12345
# Option 1: otel_metric_name label matcher (recommended)
{otel_metric_name="jvm.memory.used.bytes", service_name="adservice", jvm_memory_type="heap"}
# Option 2: Prometheus-compatible name
jvm_memory_used_bytes{service_name="adservice", jvm_memory_type="heap"}

Sending Prometheus Metrics to Dash0

The best way to send Prometheus metrics to Dash0 is via the OpenTelemetry Collector. See our integration documentation for setup instructions.

Further Reading