If you use your own environment ActiveGate, use the <ip-address>:9999 or <hostname>:9999 format.
Replace <technology> with the code module required for your application. Valid options are all, java, apache, nginx, nodejs, dotnet, php, sdk, and go. You can specify several code modules, separated by hyphen (-), for example java-go. Including specific technology-support options, rather than support for all technology options, results in a smaller OneAgent package.
What if my Docker image is based on Alpine Linux?
Dynatrace OneAgent supports Alpine Linux-based environments. Use this syntax:
Valid options here are all, go, java, apache, nginx, and nodejs.
Build your application image.
Build the Docker image from your dockerfile to use it in your Kubernetes environment:
docker build -t yourapp .
You can monitor your application containers with a different Dynatrace environment. To do this, read the instructions below:
For OneAgent version 1.139+, if you have an existing application image where you've already added the OneAgent code modules for a specific Dynatrace environment, you can have the OneAgent report to another Dynatrace environment without rebuilding your application image.
For this you need to make a call to the REST endpoint of your second Dynatrace environment. Make sure to adapt the respective placeholders <your-environment-id> and <your-paas-token>.
In return, you get a JSON object that covers the required information that needs to be passed as an environment variable to the application container. Make sure you set the environment variables of the application container as described below:
DT_TENANT: equals tenantUUID
DT_TENANTTOKEN: equals tenantToken
DT_CONNECTION_POINT: semi-colon separated list of communicationEndpoints
Add the following commands to your current Dockerfile to integrate OneAgent and activate instrumentation of your application. Define variables with optional default values using ARG instructions.
CMD ["executable", "param1", "param2"]# the command of your application, for example, Java
The commands above that use wget and unzip might fail if they aren't provided by the base image.
Replace <your-environment-id> with your Dynatrace environment ID. If you're using Dynatrace Managed, you need to provide your Dynatrace Cluster URL (https://<YourDynatraceServerURL>/e/<your-environment-id>/api).
Replace <your-paas-token> with your PaaS token.
DT_ONEAGENT_OPTIONS - this is the flavor (valid options are default or musl for Alpine images) and the technology (code module).
Syntax for default is flavor=default&include=all.
Syntax for musl is flavor=musl&include=all.
What if my Docker image is based on Alpine Linux?
Dynatrace OneAgent supports the flavor musl for Alpine Linux–based environments. Valid options for flavor=musl are all, go, java, apache, nginx, and nodejs.
Build your application image.
Build the Docker image from your dockerfile to use it in your Kubernetes environment:
docker build -t yourapp .
You can monitor your application containers with a different Dynatrace environment. To do this, read the instructions below:
For OneAgent version 1.139+, if you have an existing application image where you've already added the OneAgent code modules for a specific Dynatrace environment, you can have the OneAgent report to another Dynatrace environment without rebuilding your application image.
For this you need to make a call to the REST endpoint of your second Dynatrace environment. Make sure to adapt the respective placeholders <your-environment-id> and <your-paas-token>.
In return, you get a JSON object that covers the required information that needs to be passed as an environment variable to the application container. Make sure you set the environment variables of the application container as described below:
DT_TENANT: equals tenantUUID
DT_TENANTTOKEN: equals tenantToken
DT_CONNECTION_POINT: semi-colon separated list of communicationEndpoints
Configure network zones optional
You can configure network zones as an environment variable: