Monitor AWS App Runner
To deploy OneAgent on App Runner, read the instructions provided below.
Integrate OneAgent into your application image
Build-time injection (for ECS, EKS, and App Runner) embeds OneAgent into your container image.
To use this option you need:
Docker version 17.05+
OneAgent version 1.155+
Sign in to Docker with your Dynatrace environment ID as username and your PaaS token as password.1docker login -u <your-environment-id> <your-environment-url>
Add two additional lines of code to the application image after the last
FROMcommand:1COPY --from=<your-environment-url>/linux/oneagent-codemodules:<technology> / /2ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so
<your-environment-url>with the URL or IP address of your environment or your ActiveGate.
<technology>with the code module required for your application. Valid options are
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:1COPY --from=<your-activegate>/linux/oneagent-codemodules-musl:<technology> / /2ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so
Valid options here are
Build your application image.
Build the Docker image from your dockerfile to use it in your Kubernetes environment:1docker 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
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_CONNECTION_POINT: semi-colon separated list of
Troubleshoot OneAgent integration issues
If you encounter issues integrating OneAgent, use troubleshooting variable
INFO. This will enable you to see OneAgent logs in the CloudWatch logs.
Enter an additional line of code to the application image as in the example below:1COPY --from=<your-environment-url>/linux/oneagent-codemodules:<technology> / /2ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so3ENV DT_LOGLEVELCON INFO
Configure network zones optional
You can configure network zones as an environment variable:
See network zones for more information.
For AWS App Runner, monitoring consumption is based on host units. See Application and Infrastructure Monitoring (Host Units) for details.