Using OpenTelemetry Metrics with Observe Agent v2

Observe Agent v2 exports all metrics as Prometheus metrics by default. This is done by using the provided prometheusremotewrite/observe exporter instead of the otlphttp/observe exporter. If you want to export metrics as OTel metrics (for example, to use the new observe-agent version with an existing datastream that’s currently receiving OTel Metrics), you can add the following override to your observe-agent config file:

otel_config_overrides:
  service:
    pipelines:
      metrics/forward:
        receivers: [otlp]
        processors: [resourcedetection, resourcedetection/cloud]
        exporters: [otlphttp/observe]

      # If host_monitoring is enabled
      metrics/agent-filestats:
        receivers: [filestats/agent]
        processors: [resourcedetection, resourcedetection/cloud]
        exporters: [otlphttp/observe]

      # If host_monitoring::metrics or host_monitoring::metrics::host is enabled
      metrics/host_monitoring_host:
        receivers: [hostmetrics/host-monitoring-host]
        processors: [memory_limiter, resourcedetection, resourcedetection/cloud, batch]
        exporters: [otlphttp/observe]

      # If host_monitoring::metrics::process is enabled
      metrics/host_monitoring_process:
        receivers: [hostmetrics/host-monitoring-process]
        processors: [memory_limiter, resourcedetection, resourcedetection/cloud, batch]
        exporters: [otlphttp/observe]

      # If self_monitoring is enabled
      metrics/agent-internal:
        receivers: [prometheus/agent, count]
        processors: [memory_limiter, transform/truncate, resourcedetection, resourcedetection/cloud, batch]
        exporters: [otlphttp/observe]