Recommended Collector configuration

Use this OpenTelemetry Collector configuration example if you want to monitor an environment that isn’t running in Kubernetes.

If your environment uses Kubernetes, follow the quickstart to install and configure your Collectors.

Download the Collector from the opentelemetry-collector-contrib GitHub repo.

This configuration:

  • Sets Cloud Observability as an exporter endpoint

    You need to create an access token for your Cloud Observability project and set it as an environment variable named ${LIGHTSTEP_ACCESS_TOKEN}.

  • Configures a pipeline for log, metric, and trace data

    If you are using a non-OTLP logging receiver (like the filelog receiver), add it to your pipeline on line 257.

  • Modifies log, metric, and span attributes to conform to the OpenTelemetry semantic conventions
  • Scrapes host metrics
  • Enables the batch processor
  • Enables resource detection
  • Enables the health_check extension to run liveness checks for the Collector
  • Enables the opamp extention to report Collector configuration to Cloud Observability

    You need to create an API key with the OpAMP Agent role and set it as an environment variable named ${LS_OPAMP_API_KEY}.

See also

Technology recommendations

Monitor Collector health

Ingest metrics using the Collector

Updated Apr 25, 2024