Skip to main content
This guide explains how to set up Dynatrace to ingest OpenTelemetry traces via the OpenTelemetry Collector (OTel Collector) using Docker.

Prerequisites

Instructions

Step 1. Generate Dynatrace Token

  1. In the Dynatrace console, navigate to access keys.
  2. Click on Create a new key
  3. You will be prompted to select a scope. Choose Ingest OpenTelemetry traces.
  4. Save the generated token securely; it cannot be retrieved once lost. Example of a generated token (taken from Dynatrace website):

Step 2. Configuration Files

  1. OTel Collector Configuration File Create a YAML file named otel-collector-config.yml. In this file replace <YOUR-ENVIRONMENT-STRING> with the string from the address bar when you log into Dynatrace. Replace <YOUR-DYNATRACE-API-KEY> with the token you generated earlier. Here’s a sample configuration file:
  1. Docker Compose File Create a file named docker-compose.yml. Here is the sample Docker Compose file:

Step 3. Testing and Viewing Traces

  1. Launch the Docker containers: docker-compose up -d
  2. Initialize your Tyk environment.
  3. Deploy a simple HTTP API on your Tyk Gateway.
  4. Use cURL or Postman to send requests to the Gateway.
  5. Navigate to Dynatrace -> Services -> Tyk-Gateway. Dynatrace Services
  6. Wait for 5 minutes and refresh.
  7. Traces, along with graphs, should appear. If they don’t, click on the “Full Search” button. Dynatrace Metrics
And there you have it! You’ve successfully integrated Dynatrace with the OpenTelemetry Collector using Docker.

Troubleshooting

If traces are not appearing:
  • try clicking on the “Full Search” button after waiting for 5 minutes.
  • Make sure your Dynatrace token is correct in the configuration files.
  • Validate the Docker Compose setup by checking the logs for any errors: docker-compose logs