Configure your own OTel collector without Kubernetes

This topic describes how you can send OpenTelemetry trace data to Observe from any environment, including CI pipelines, standalone applications, and serverless functions, without Kubernetes.

Prerequisites

Before you continue, verify the following requirements are met:

  • You have an Observe workspace with tracing enabled.
  • You have a Kubernetes Explorer integration token (required for traces to appear in the Tracing/Spans Dataset)
❗️

Important

Traces sent with a generic OpenTelemetry Datastream token will appear as raw data but will not be routed to the Tracing/Spans Dataset. You must use a Kubernetes Explorer integration token even for non-Kubernetes environments.

Get a Kubernetes Explorer integration token

Perform the following steps if you need a new Kubernetes Explorer integration token:

  1. In Observe, select Data & integrations > Add data from the left navigation rail.
  2. Click the Kubernetes card.
  3. Click the Install tab.
  4. Click Create in the Create a new ingest token section, then copy the token that is generated.

You don't need to complete the Kubernetes Explorer integration, you just need the token.

Setup

Next, you can provide the new Kubernetes Explorer integration token, or use any existing Kubernetes Explorer integration token. Configure your OTEL exporter with the following environment variables.

OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://<customer_id>.collect.observeinc.com/v2/otel/v1/traces
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <kubernetes_explorer_token>,x-observe-target-package=Tracing"

Traces will appear in the Tracing/Spans Dataset within a few minutes.

The following example shows how you can send GitHub actions to Observe:

env:
  OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: https://${{ vars.OBSERVE_CUSTOMER_ID }}.collect.observeinc.com/v2/otel/v1/traces
  OTEL_EXPORTER_OTLP_HEADERS: "Authorization=Bearer ${{ secrets.OBSERVE_K8S_TOKEN }},x-observe-target-package=Tracing"

Troubleshooting

SymptomCauseFix
Traces appear in raw data but not Tracing/SpansWrong token type (OpenTelemetry Datastream token instead of Kubernetes Explorer)Use a Kubernetes Explorer integration token.
No data at allIncorrect endpoint or expired tokenVerify the customer ID and token are correct.