Skip to content

Latest commit

 

History

History
84 lines (47 loc) · 3 KB

File metadata and controls

84 lines (47 loc) · 3 KB

Dynatrace Integration

Dynatrace OneAgent is a Java agent that sends all captured monitoring data to your Dynatrace monitoring environment for analysis.

Dynatrace supports full-stack monitoring for Cloud Foundry – from the application to the infrastructure layer. To integrate it with your Java application, follow the steps below.

  1. Obtain an environment ID and an API access token.

  2. Create a user-provided service.

    The service name should contain the string "dynatrace" (for example, dynatraceservice). The environmentid and apitoken parameters have been generated in the previous step. You also need to set up the apiurl, which depends on the Dynatrace type you want to integrate.

    • SaaS Dynatrace

      "apiurl": "https://<environmentid>.live.dynatrace.com/api"
      
    • Managed Dynatrace

      "apiurl": "https://<your_domain>/e/<environmentid>/api"
      

    Then, in cf CLI, run the following command:

    cf cups dynatraceservice -p "environmentid, apitoken, apiurl"
    

    For more information, see:

  3. Bind the application to the service instance created in the previous step, by using the manifest.yml file.

    Sample Code:

    ---
    applications:
    - name: myapp
      memory: 1G
      instances: 1
      buildpack: sap_java_buildpack_jakarta
      services:
      - dynatraceservice
    

    NOTE: If there are more than one Dynatrace services bound to the application, the service that's going to be used is the one that was chronologically bound first.

  4. Deploy the application to the SAP BTP, Cloud Foundry environment with the updated manifest.yml file. Run:

    cf push myapp
    

    Once the application receives Web traffic, monitoring data will show up in Dynatrace.

Related Information

Dynatrace Docs: Access tokens API

Dynatrace Docs: Cloud Foundry Monitoring