Collector deployment
Deployment Options
The Dynatrace Collector can be deployed for the following platforms:
Kubernetes
For Kubernetes, the Dynatrace Collector can be deployed in the following ways:
- OpenTelemetry Kubernetes Operator
- Helm
- Raw manifest
Dynatrace access details
Before you deploy the Collector, you need to set up the necessary Kubernetes secrets for the Dynatrace access details.
Use kubectl to create Kuberenetes secrets for the Dynatrace export details. Replace the placeholders with the actual values for the export URL and the API token.
kubectl create secret generic dynatrace-otelcol-dt-api-credentials --from-literal=DT_ENDPOINT=ACTIVEGATE_URL_HERE --from-literal=DT_API_TOKEN=API_TOKEN_HERE
The sample configurations apply a resource limit of 512 megabytes. You may need to adjust this under resources.limits.memory
for your particular use case.
In Kubernetes, it is common to enrich OpenTelemetry signals using the Kubernetes Attributes processor. This requires a Kubernetes service account, which is automatically configured when using Operator or Helm.
For raw manifests, this needs to be configured manually by adding a spec.serviceAccountName: collector
entry to the deployment manifest.
Docker
Run the following command to download the image of the Dynatrace Collector:
docker pull ghcr.io/dynatrace/dynatrace-otel-collector/dynatrace-otel-collector:latest
Next, run the Collector image with the following command:
docker run -v $(pwd)/otel-collector-config.yaml:/etc/otelcol/otel-collector-config.yaml ghcr.io/dynatrace/dynatrace-otel-collector/dynatrace-otel-collector:latest --config=/etc/otelcol/otel-collector-config.yaml
The -v
parameter maps the local configuration file to the given container path, which is subsequently passed to the --config
parameter.
Make sure to map all required network ports with the -p
parameter. For example, if you accept OTLP gRPC requests on the default port, you need to specify port 4317. For OTLP over HTTP specify port 4318.
Docker Compose
Use the following configuration in your Compose file to deploy and run the Collector image:
version: "3"services:collector:image: ghcr.io/dynatrace/dynatrace-otel-collector/dynatrace-otel-collector:latestcommand: ["--config=/etc/otelcol/otel-collector-config.yaml"]volumes:- ./otel-collector-config.yaml:/etc/otelcol/otel-collector-config.yamlports:- "4317:4317" # OTLP gRPC- "4318:4318" # OTLP HTTP
In the example above, ports
is configured for gRPC and HTTP. Adjust the list of ports according to your specific use case.
Linux, Windows, and macOS
To install the Collector binary manually
-
Download the latest version for your operating system from GitHub.
-
Decompress the archive file.
-
Set up the desired configuration and save it to
otel-collector-config.yaml
. -
Run the
dynatrace-otel-collector
binary and pass the path to the configuration file using the--config
parameter../dynatrace-otel-collector --config=$(pwd)/otel-collector-config.yaml
Container image registries
Container images for the Dynatrace distribution of the OpenTelemetry Collector are available in
-
GitHub Container Registry (GHCR)
ghcr.io/dynatrace/dynatrace-otel-collector/dynatrace-otel-collector:latest
-
Amazon Elastic Container Registry (Amazon ECR)
public.ecr.aws/dynatrace/dynatrace-otel-collector:latest
Deployment Modes
The Collector can be deployed as a standalone agent, a gateway, or a sidecar.
It's also possible to combine these deployment modes and chain Collector instances. Consider this if you are deploying the Collector in large environments.