The Prometheus receiver is part of the contrib distribution of the OpenTelemetry Collector (
otelcol-contrib). It isn’t included in the core distribution.Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Create an API token in Axiom with permissions to ingest data to the dataset you have created.
When you create the dataset, select Metrics as the dataset type. Metrics require their own dedicated dataset. For more information, see Create dataset.
Enable Prometheus metrics in Traefik
Enable the Prometheus metrics provider in Traefik’s static configuration:/metrics on the internal traefik entrypoint (port 8080 by default). To add per-router metrics, set addRoutersLabels: true as well. For all options, see the Traefik documentation.
Configure the OpenTelemetry Collector
Add a Prometheus receiver that scrapes Traefik and an OTLP/HTTP exporter that sends data to Axiom:Replace
AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME with the name of the Axiom dataset where you send your data.For metrics, use the x-axiom-metrics-dataset header instead of x-axiom-dataset.Traefik v3 can also push OTLP metrics directly (
metrics.otlp) — for example, to the OTLP receiver of an OpenTelemetry Collector that forwards to Axiom as shown above. For more information, see the Traefik documentation.