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.
Windows, macOS, and Linux
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
Linux installer packages
Dynatrace also provides DEB and RPM installer packages for Linux systems on x86-64 and ARM64 architectures.
The installer packages require Systemd to be the active init system.
To deploy the Collector using an installer package, download the latest version for your operating system from GitHub, and install it using root privileges and the following commands.
Replace the following two placeholders in the commands with their actual content:
<VERSION>
with the version tag of the download<ARCH>
with the system architecture tag (that is,x86_64
orarm64
) of the download
Service configuration
When first starting the service, it may fail to start if there is no configuration file in place yet. By default, the Collector attempts to find the file at /etc/dynatrace-otel-collector/config.yaml
.
If you wish to use a different path, you can override the default path with the --config
parameter as part of the OTELCOL_OPTIONS
variable in the Systemd environment file at /etc/dynatrace-otel-collector/dynatrace-otel-collector.conf
:
OTELCOL_OPTIONS="--config=<HERE-PATH-TO-CONFIG-FILE>"
Subsequent package updates will replace this file, so be sure to back up and restore its content during an update of the Collector package. Alternatively, you can override the configuration with the systemctl edit
command.
To see all available configuration options, run the Collector binary with the --help
parameter.
After changing the configuration, make sure to restart the service using the following command and root privileges:
systemctl restart dynatrace-otel-collector
Service status
To view the current status of the Collector service, run the following command with root privileges:
systemctl status dynatrace-otel-collector
To check the output of the Collector service, run the following command with root privileges:
journalctl -u dynatrace-otel-collector
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.