Metrics
One of the key signals of Observability is metrics. Find out how Dash0 allows you to quickly navigate through your metrics and use them in alerts and dashboards.
Supported Metric Types
Dash0 supports all standard OpenTelemetry metric types, with the exception of exponential histograms. The supported types include:
- Counter: Monotonically increasing values that track the occurrence of events
- Gauge: Values that can increase or decrease over time
- Histogram: Samples observations into configurable buckets
- Summary (Legacy): Similar to histograms but with client-side calculated quantiles
Reference: OTLP Metric Data Model
Compatibility with Time Series (Prometheus)
Dash0 fully adheres to the official OpenTelemetry and Prometheus metric compatibility standards, ensuring that your existing metrics infrastructure integrates seamlessly with our platform. Prometheus metrics need to be converted to the OTLP format before sending them to Dash0. This conversion can typically be done using the Prometheus receiver in the OpenTelemetry Collector.
Reference: Prometheus Metric points to OTLP
Querying Metrics in Dash0
Dash0 provides a flexible query interface that supports standard PromQL syntax. Since OTLP naming convention and Prometheus metric naming convention are different, Dash0 extends PromQL with the ability to query OpenTelemetry metrics through label matchers:
- OTLP metric names can be queried using the
otel_metric_name
label. - Prometheus-compatible labels are created from OTLP attributes by replacing all non-alphanumeric characters with an underscore
_
.
Example:
1{otel_metric_name="jvm.memory.used", service_name="catalog", jvm_memory_type="heap"}
For each OTLP metric, Dash0 also generates a Prometheus-compatible metric name. For example, the OTLP metric jvm.memory.used
is mapped to jvm_memory_used_bytes
, which can be directly queried in PromQL.
Example:
1jvm_memory_used_bytes{service_name="catalog", jvm_memory_type="heap"}
The promQL query will fail with a parsing error if you use the otel metric name or attribute directly. For instance, the following query will return an unexpected character: '.'
parsing error.
1jvm.memory.used.bytes{service.name="catalog", jvm.memory.type="heap"}
Working with Histogram Metrics
Histograms are particularly valuable for measuring distributions of values like request durations, response sizes, or other variable measurements. Dash0 provides comprehensive support for histogram metrics, allowing you to analyze your data in multiple ways:
- Observation count: Query the total number of observations using the
_count
suffix
1http_request_duration_seconds_count
- Sum of observations: Access the sum of all observed values using the
_sum
suffix
1http_request_duration_seconds_sum
- Bucketed observations: Examine the distribution of values across predefined buckets using the
_bucket
suffix. Use thele
(less than or equal) label to select specific bucket boundaries. The below query returns the count of observations that fell into buckets with upper bounds less than or equal to 0.5 seconds.
1http_request_duration_seconds_bucket{le="0.5"}
- Histogram Functions: Dash0 also supports various PromQL histogram functions that make it easy to calculate average or percentiles
1histogram_quantile(0.9, rate({otel_metric_name = "http_requests_duration_seconds", otel_metric_type = "histogram"}[5m]))
Working with Summary Metrics
Like histograms, summary metrics track both counts and sums of observations, but they also calculate quantiles on the client side. In Dash0, summary metrics are accessed through:
- Observation count: Using the
_count
suffix
1http_request_duration_seconds_count
- Sum of observations: Using the
_sum
suffix
1http_request_duration_seconds_sum
- Quantiles: Directly querying the summary with quantile labels
1{otel_metric_name="http_request_duration_seconds", otel_metric_type="summary", quantile="0.9"}
- Average: Calculate the mean value by dividing the sum by the count
1http_request_duration_seconds_sum / http_request_duration_seconds_count
Last updated: March 24, 2025