Skip to main content
If your apps already send their telemetry to an OpenTelemetry Collector of your own, you do not need to change the apps. Add a second exporter to the Collector instead: it forwards metrics and traces to the platform, with the token, and everything to your own backend as before. Tested by TestCollectorFanout in tests/otelapps, which runs the configuration below on the stock otel/opentelemetry-collector-contrib 0.165.0 image and checks that metrics and traces arrive at both a tenant backend and a platform stand-in that refuses requests without the token.

The configuration

From examples/otel-collector-fanout/collector.yaml:
It reads three environment variables: Every component used here (otlp receiver, memory_limiter, batch, otlphttp exporter) is part of the core and contrib distributions.

Adding it to an existing configuration

You probably have receivers, processors and an exporter already. Only two things are new:
  1. the otlphttp/platform exporter with the Authorization header, and
  2. that exporter added to the metrics and traces pipelines.
Keep it out of the logs pipeline: the platform accepts logs and discards them, so sending them only costs bandwidth.

Things to keep in mind

  • One token per Collector is enough: the token identifies your project, and service.name from each app’s resource tells the services apart.
  • Do not filter or rename the HTTP duration metrics or their http.* attributes on the way to the platform; it needs http.server.request.duration (or http.server.duration) with the method, route and status code (what-gets-dropped.md).
  • Do not aggregate across apps before export (for example with a processor that merges services): the platform keeps service.name as a dimension.
  • Sampling. If your Collector samples traces (tail sampling) and your apps send no metrics, the platform derives request counts from the sampled spans and undercounts. Export metrics, or send the platform copy from a pipeline before sampling.
  • Retries. The platform answers 429 when a project exceeds its rate limit and 502 or 503 during short outages; the exporter’s retry and queue settings above handle both.