Try it free

Send OpenTelemetry data to multiple backends

  • How-to guide
  • 2-min read
  • Published Jan 26, 2024

The following configuration example shows how to configure a Collector instance to send telemetry data to multiple backends at the same time.

Prerequisites

  • One of the following Collector distributions:
    • The Dynatrace OTel Collector
    • OpenTelemetry Core or Contrib
    • A custom Builder version
  • For Dynatrace:
    • The Dynatrace API endpoint URL to which the data should be exported
    • An API token with the relevant access scope (only required for SaaS and ActiveGate)
  • The ingest URLs and any applicable authentication credentials for the other backends

See Collector Deployment and Collector Configuration on how to set up your Collector with the configuration below.

Demo configuration

receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
otlp_http/dynatrace:
endpoint: ${env:DT_ENDPOINT}
headers:
Authorization: "Api-Token ${env:DT_API_TOKEN}"
otlp_grpc/coldstorage:
endpoint: my.coldstorage.example:4317
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [otlp_http/dynatrace, otlp_grpc/coldstorage]
metrics:
receivers: [otlp]
processors: []
exporters: [otlp_http/dynatrace, otlp_grpc/coldstorage]
logs:
receivers: [otlp]
processors: []
exporters: [otlp_http/dynatrace, otlp_grpc/coldstorage]
Configuration validation

Validate your settings to avoid any configuration issues.

Components

For our configuration, we configure the following components.

Receivers

Under receivers, we specify the otlp receiver as the active receiver component for our Collector instance.

Exporters

Under exporters, we specify the following exporter instances for our backends.

  • An otlp_http exporter for Dynatrace
  • A gRPC otlp exporter for the cold storage system

For the Dynatrace exporter, we set the following two environment variables and reference them in the configuration values for endpoint and Authorization.

  • DT_ENDPOINT contains the base URL of the Dynatrace API endpoint (for example, https://{your-environment-id}.live.dynatrace.com/api/v2/otlp)
  • DT_API_TOKEN contains the API token

Service pipelines

Under service, we eventually assemble our receiver and exporter objects into pipelines, which accept any OTLP request (HTTP and gRPC) and forward it to the configured backends, using the configured exporters.

Limits and limitations

Data is ingested using the OpenTelemetry protocol (OTLP) via the Dynatrace OTLP APIs and is subject to the API's limits and restrictions. For more information see:

  • OpenTelemetry metrics limitations
  • Dynatrace metrics mapping
  • Ingest OpenTelemetry logs

Related topics

  • Enrich ingested data with Dynatrace-specific fields
  • Enrich OTLP requests with Kubernetes data
Related tags
Application Observability