Ingest metrics using the OpenTelemetry Collector

This documentation is provided as a reference for users who may wish to evaluate or explore OTLP Metrics as it’s being developed.

The OpenTelemetry Collector allows for metric data to be received, processed, and exported via OpenTelemetry Protocol (OTLP). To integrate with a metric source using the Collector, you need to first configure the Collector to export the data to Cloud Observability in telemetry pipelines. Once that’s done, you can configure any number of receivers to send data to the Collector. The Collector then processes that data and sends it through the configured pipeline to Cloud Observability.

This topic covers how to set up the Collector to export any metrics to Cloud Observability.

Once that configuration is complete, you need add further configuration for the Collector receiver.

Cloud Observability supports receiving Prometheus, Java/JMX, and other metric data in the OTLP format using the OpenTelemetry Collector.

For instructions on how to setup an OpenTelemetry Collector in a Kubernetes cluster to ingest Prometheus metrics, see Ingest Prometheus metrics using an OpenTelemetry Collector on Kubernetes

Prometheus metrics

Java/JMX metrics

Telegraf metrics

Other metrics

Please note that not all metrics receivers available for the OpenTelemetry Collector have been tested by Cloud Observability, and there may be bugs or unexpected issues in using these contributed receivers with Cloud Observability. File any issues with the appropriate OpenTelemetry community.

Requirements

OpenTelemetry Collector v0.50.0 or later

Prerequisites

An access token for the project to report metrics to.

Configure the Collector exporter

To configure your collector to report metrics to Cloud Observability, add the otlp/lightstep exporter and update a pipeline to your collector’s configuration file.
Replace <token> with your Cloud Observability project access token.

1
2
3
4
5
6
7
8
9
10
11
12
# add a new exporter and update a pipeline to send metrics to lightstep
exporters:
  otlp/lightstep:
    endpoint: ingest.lightstep.com:443 #US data center
    #endpoint: ingest.eu.lightstep.com:443 #EU data center
    headers:
      "lightstep-access-token": "${LS_ACCESS_TOKEN}"

service:
  pipelines:
    metrics:
      exporters: [otlp/lightstep]

Installation of the OpenTelemetry Collector varies, please refer to the collector documentation for more information.

See also

Create and manage dashboards

Create alerts

Troubleshoot missing data in Cloud Observability

Updated Sep 13, 2022