Monitor AWS App Runner

To deploy OneAgent on App Runner, read the instructions provided below.

Prerequisites

  • Create an API token in your Dynatrace environment and enable the following permissions:
    • Access problem and event feed, metrics, and topology (DataExport) (API v1)
    • PaaS integration - Installer download (InstallerDownload)
  • Review the list of supported applications and versions.

Integrate OneAgent into your application image

Build-time injection EKS, ECS, and App Runner

If you're using ECS, EKS, and App Runner, you can use build-time injection to embed OneAgent into your container image.

To use this option you need:

  • Docker version 17.05+
  • OneAgent version 1.155+
  1. Sign in to Docker with your Dynatrace environment ID as username and your PaaS token as password.

    docker login -u <your-environment-id> <your-environment-url>
  2. Add two additional lines of code to the application image after the last FROM command:

    COPY --from=<your-environment-url>/linux/oneagent-codemodules:<technology> / /
    ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so
  • Replace <your-environment-url> with the URL or IP address of your environment or your ActiveGate.

    • Dynatrace SaaS {your-environment-id}.live.dynatrace.com1

    • Dynatrace Managed {your-domain}/e/{your-environment-id}1

      1

      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:

COPY --from=<your-activegate>/linux/oneagent-codemodules-musl:<technology> / /
ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so

Valid options here are all, go, java, apache, nginx, and nodejs.

  1. 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>.

    curl "https://<your-environment-id>.live.dynatrace.com/api/v1/deployment/installer/agent/connectioninfo?Api-Token=<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:

  • DT_NETWORK_ZONE: equals your.network.zone

See network zones for more information.

Monitoring Consumption

For AWS App Runner, monitoring consumption is based on host units. See Application and Infrastructure Monitoring (Host Units) for details.

Troubleshoot