VictoriaMetrics supports data ingestion via OpenTelemetry protocol (OTLP) for metrics at /opentelemetry/v1/metrics path. It expects protobuf-encoded requests at /opentelemetry/v1/metrics. For gzip-compressed workload set HTTP request header Content-Encoding: gzip.

See how to configure OpenTelemetry Collector to push metrics to VictoriaMetrics.

Label sanitization #

By default, VictoriaMetrics stores the ingested OpenTelemetry metric points as is without any transformations. The following label sanitization options can be enabled:

  • -usePromCompatibleNaming - replaces characters unsupported by Prometheus with _ in metric names and labels for all ingestion protocols. For example, process.cpu.time{service.name="foo"} is converted to process_cpu_time{service_name="foo"}.
  • -opentelemetry.usePrometheusNaming - converts metric names and labels according to OTLP Metric points to Prometheus specification for metrics ingested via OTLP. For example, process.cpu.time{service.name="foo"} is converted to process_cpu_time_seconds_total{service_name="foo"}.
  • -opentelemetry.convertMetricNamesToPrometheus - converts only metric names according to OTLP Metric points to Prometheus specification for metrics ingested via OTLP. For example, process.cpu.time{service.name="foo"} is converted to process_cpu_time_seconds_total{service.name="foo"}. See more about this use case here .
Note

These flags can be applied on vmagent, vminsert or VictoriaMetrics single-node.

Resource Attributes #

By default, VictoriaMetrics promotes all OpenTelemetry resource attributes to labels and attaches them to all ingested OTLP metrics.

Exponential histograms #

OpenTelemetry exponential histogram is automatically converted to VictoriaMetrics histogram format during ingestion. Since VictoriaMetrics histogram doesn’t support negative observations, all buckets in the negative range are dropped.

Delta Temporality #

In OpenTelemetry, some metric types(including sums, histograms, and exponential histograms) support delta and cumulative aggregation temporality. VictoriaMetrics works best with cumulative temporality, and it’s recommended to export metrics with cumulative temporality or convert delta to cumulative temporality using OpenTelemetry Collector deltatocumulative processor before sending to VictoriaMetrics. VictoriaMetrics stores delta temporality metric values as is Available from v1.132.0 , they can be queried with sum_over_time() and rate_over_sum() .

Note

Do not apply deduplication or downsampling to delta temporality metrics, since it might cause data loss.

References #