How It Works
Prometheus is a widely adopted open source metrics server with its own API and client libraries. Prometheus clients expose their metrics on an HTTP endpoint. Prometheus servers can then connect to that endpoint and store the metrics they provide. OpenTelemetry Collector acts like a Prometheus server, and will transform Prometheus metrics signals into OpenTelemetry Metrics signals, which can then be forwarded to Honeycomb over the OpenTelemetry Line Protocol (OTLP).- Instrumented app exposes a Prometheus endpoint, which is being scraped by OpenTelemetry Collector.
- OpenTelemetry Collector sends data to Honeycomb over OTLP.
Instrumenting Your Application as a Prometheus Client
Refer to the Prometheus documentation to find details about the appropriate client library for your application.Installing and Running OpenTelemetry Collector
Find and download a recent release of OpenTelemetry Collector from the Releases page on GitHub. OpenTelemetry Collector requires a configuration file to run (find more details below). If your configuration file exists in the current working directory atotel_collector_config.yaml, you can then run it using the following command:
Configuring OpenTelemetry Collector
To scrape Prometheus endpoints, you will need to configure OpenTelemetry Collector with a pipeline that starts with aprometheus receiver.
To forward scraped metrics to Honeycomb, your pipeline should end with an otlp exporter.
Pipelines are specified in an OpenTelemetry Collector configuration file.
Here is a bare bones example of a configuration file configured to scrape prometheus metrics and send them to Honeycomb: