• Home
  • Setup and configuration
  • Set up Dynatrace on cloud platforms
  • Microsoft Azure
  • Integrate OneAgent with Azure Spring Cloud

Integrate OneAgent with Azure Spring Cloud

You can configure Dynatrace to fully monitor your Azure Spring Cloud workloads. Not only can Dynatrace ingest Azure Spring Cloud metrics from Azure Monitor, but it can also inject OneAgent into your application to inspect the topology and performance of each individual component.

Capabilities and limitations

Capabilities

  • Full-stack monitoring powered by OneAgent
  • Integration with Azure Monitor
  • Automatic service detection of services running in Azure Spring Cloud

Limitations
Since Azure Spring Cloud is a fully managed hosting platform, applications are deployed into a sandboxed environment that doesn't allow direct access to the underlying operating system. This results in some restrictions for OneAgent:

  • Code-module support limited to Java.
  • The functionality is currently available only for services (web applications, API applications, and mobile apps) on Windows.

See below how you can integrate OneAgent with your Azure Spring Cloud application to monitor your Spring Cloud workloads with Dynatrace.

Prerequisites

  • Create a PaaS token
  • Install the Azure CLI

Set up integration

1. Prepare your environment in Azure

  1. In Azure Portal, create an Azure Spring Cloud instance.

  2. In the new Azure Spring Cloud instance, create an application that you want to report to Dynatrace by running the command below.

    Note: Be sure to replace the placeholders (<...>) with your own values.

    shell
    az spring-cloud app create --name <your-application-name> --is-public true -s <your-resource-name> -g <your-resource-group-name>

2. Determine the values for the required environment variables

To set up OneAgent integration with your Azure Spring Cloud instance, you need to configure three environment variables:

  • DT_TENANT
  • DT_TENANTTOKEN
  • DT_CONNECTION_POINT.

Before you begin, collect the following information:

  • Your Dynatrace environment ID
  • Authentication
    • PaaS token authenticates you as a Dynatrace user and is required to determine the tenant token.
    • Tenant token allows OneAgent to report data to Dynatrace. For more information on tokens, see Access tokens.
  1. The value for DT_TENANTis your Dynatrace environment ID.

  2. To determine the values for DT_TENANTTOKEN and DT_CONNECTION_POINT, make an API request to the Deployment API - GET connectivity information for OneAgent endpoint. The values you need are returned as tenantToken and communicationEndpoints.

    You can submit the call to your environment URL (SaaS or Managed) or an Environment ActiveGate URL.

    • Dynatrace SaaS:

      shell
      curl https://<your-environment-id>.live.dynatrace.com/api/v1/deployment/installer/agent/connectioninfo?Api-Token=<your_PaaS_token>

      Replace:

      • <your-environment-id> with your Dynatrace environment ID
      • <your_PaaS_token> with your PaaS token
    • Dynatrace Managed:

      shell
      curl https://<your-domain>/e/<your-environment-id>/api/v1/deployment/installer/agent/connectioninfo?Api-Token=<your_PaaS_token>

      Replace:

      • <your-domain> with your Managed deployment domain
      • <your-environment-id> with your Dynatrace environment ID
      • <your_PaaS_token> with your PaaS token
    • Environment ActiveGate:

      shell
      curl https://<your-activegate-domain>/e/<your-environment-id>/api/v1/deployment/installer/agent/connectioninfo?Api-Token=<your_PaaS_token>

      Replace

      • <your-activegate-domain> with your ActiveGate domain
      • <your-environment-id> with your Dynatrace environment ID
      • <your_PaaS_token> with your PaaS token

3. Add the environment variables to your application

Once you have the values for the environment variables required for OneAgent integration, you can add the respective key/value pairs to your application either on Azure Portal, or in the Azure CLI. See the instructions below for each of these options.

Run the command below, making sure to replace the placeholders (<...>) with your own values determined in the previous steps.

shell
az spring-cloud app deploy --name <your-application-name> --jar-path app.jar \ -s <your-resource-name> -g <your-resource-group-name> --env DT_TENANT=<your-environment-ID> \ DT_TENANTTOKEN=<your-tenant-token> DT_CONNECTION_POINT=<your-communication-endpoint>
  1. Go to your Azure Spring Cloud instance and select the resource group where Dynatrace will be deployed.

  2. Select the application for which you want Dynatrace to report data.

  3. Select Configuration and enter the following environment variables key/value pairs.

    KeyValue
    DT_TENANTYour Dynatrace environment ID
    DT_TENANTTOKENYour tenant token. See Determine the values for the required environment variables for details.
    DT_CONNECTION_POINTYour communication endpoint. See Determine the values for the required environment variables for details.

Optionally, you can customize the built-in rules for process group detection by setting another environment variable, DT_CLUSTER_ID. The value can be the name of the process group you want to see in Dynatrace. See Process group detection for details.

View data in Dynatrace

Once you add the environment variables to your application, Dynatrace starts collecting data from it. To view data for your Azure Spring Cloud application, in the Dynatrace menu, go to Services and select your application.

Example service flow:

AppFlow

Example CPU consumption:

Diagnostic cpu

Example response time analysis:

Resposetime

OneAgent updates

OneAgent updates are performed automatically with the JDK.

Following a OneAgent update, you need to restart or redeploy your applications for them to be monitored with a new OneAgent version. This is because some components of OneAgent keep running in processes that are monitored by Dynatrace.

  • Before restart, these processes will continue to be monitored with the previous version of OneAgent.
  • After restart, these processes will be monitored with the latest version of OneAgent.
Related topics
  • Azure Spring Cloud monitoring

    Monitor Azure Spring Cloud and view available metrics.

  • OneAgent platform and capability support matrix

    Learn which capabilities are supported by OneAgent on different operating systems and platforms.