Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
fabio_saito
Advisor
Advisor

Overview


This blog demonstrates how to deploy the Datadog agent with an app in SAP BTP to send metrics, traces, and logs to Datadog.

What is Datadog ?


Datadog is a popular cloud-based monitoring and analytics platform that helps organizations gain insights into the performance of their applications, infrastructure, and various other aspects of their digital systems.

Steps



  1. Sign up for a trial or free tier SAP BTP account


  2. Sign up for a Datadog account (there is a 14 days free trial account).


  3. Download the latest Cloud Foundry buildpack from Datadog GitHub.

    • The Cloud Foundry Buildpack is used to collect custom metrics, logs, traces, and profiles from your Cloud Foundry apps.It installs the Datadog Container Agent (a lightweight version of the Agent), Datadog Trace Agent for APM, and Datadog DogStatsD binary file in the container your app is running on.

    • Releases · DataDog/datadog-cloudfoundry-buildpack (github.com)



  4. Unzip the buildpackf file and set the necessary parameters in the datadog.yaml configuration file.


    • API_KEY > insert you api key created in the Datadog

    • SITE > insert the same domain as your Datadog account

    • APM_CONFIG - ENABLE > true



  5. Push the buildpack with your configuration file to a repository like GitHub so it can be referenced in your application in the next step

  6. Add the url of the buildpack to your application, it must be the first entry


    • Node.js application - add the buildpack to the manifest.json file





    • CAP application - add the buildpack to the mta.yaml file






  7. Instrument your application.


    • Install dd-trace (npm install dd-trace) to capture APM data




    • Add the tracer in code, it must come before importing any instrumented module





  8. Deploy your application to BTP Cloud Foundry

  9. Set application environment variables and restart it

  10. In the application logs, you can verify whether the Datadog agent has been started successfully or if any errors have occurred

  11. Run your application

  12. Log in to your Datadog account, you will find all the data that the Datadog sent to your account


Reference


https://github.com/DataDog/datadog-cloudfoundry-buildpack/releases

http://Cloud Foundry Setup Guide (datadoghq.com)

http://Libraries (datadoghq.com)
1 Comment