Skip to content

Using Otelcol to export metrics to VictoriaMetrics #5151

@mevishalr

Description

@mevishalr

Description

Currently, PMM relies on vmagent to scrape exporter metrics and forward them to VictoriaMetrics using Prometheus Remote Write. However, there are use cases where metrics need to be exported using the OTLP protocol via the OpenTelemetry Collector.

This introduces a compatibility gap. The OpenTelemetry Collector’s prometheusremotewrite receiver only supports the experimental Remote Write v2 protocol and does not support the widely used v1 protocol. On the other hand, vmagent currently supports only Remote Write v1 and does not support v2 (as noted in VictoriaMetrics/VictoriaMetrics#10413).

As a result, vmagent cannot directly send metrics to the OpenTelemetry Collector using Remote Write. This limitation complicates architectures where organizations prefer using OpenTelemetry for their observability needs use cases. To address this, users are required to introduce additional components or workarounds—such as intermediate storage layers, protocol translation proxies, or dual scraping configurations, in order to bridge the gap between Remote Write v1 and OTLP.

Suggested solution

Allow users to switch between vmagent and otelcol agents for scraping the exporters. The scrape configs for both these collectors will be about the same, hence making it easier to support. A config variable can be exposed to allow users to specify the agent to use for scraping the metrics.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions