Ingesting Prometheus metrics into Uptrace

You can pull Prometheus metrics using the corresponding OpenTelemetry Collector receiver and then export the data to Uptrace using OpenTelemetry protocol.

OpenTelemetry Collector

OpenTelemetry Collectoropen in new window is a proxy between your application and a backend that receives telemetry data, transforms it, and then exports to backends that can store the data permanently.

Collector can also act as an agent that pulls telemetry data from monitored systems, for example, Redis or filesystem metrics.

Prometheus receiver

You can use OpenTelemetry Collector to pull Prometheus metrics using prometheus_simpleopen in new window receiver:

receivers:
  prometheus_simple:
    collection_interval: 10s
    endpoint: '172.17.0.5:9153'
    metrics_path: '/metrics'
    use_service_account: false
    tls:
      ca_file: '/path/to/ca'
      cert_file: '/path/to/cert'
      key_file: '/path/to/key'
      insecure_skip_verify: true

And then export the metrics to Uptrace:

exporters:
  otlp:
    endpoint: localhost:14317
    headers:
      headers: { 'uptrace-dsn': 'http://project2_secret_token@localhost:14317/2' }

service:
  pipelines:
    metrics:
      receivers: [prometheus_simple]
      exporters: [otlp]

See Exporting OpenTelemetry Metrics to Prometheusopen in new window for details.

Last Updated: