Datadog Mule Integration 4 APM
How to Installing
Installing a Run the sample tracing applications
Sections:
- Installing and execution
Getting the APIs required
Please download and import in Anypoint Studio each of the 4 APIs jars:
- Experience marketing-eapi https://cdn.ioconnectservices.com/cdn/docs/Datadog-APM-Connector/examples/datadog_apis/marketing-eapi-1.0.0.jar
- Process messaging-papi: https://cdn.ioconnectservices.com/cdn/docs/Datadog-APM-Connector/examples/datadog_apis/messaging-papi-1.0.0.jar
- System contacts-sapi: https://cdn.ioconnectservices.com/cdn/docs/Datadog-APM-Connector/examples/datadog_apis/contacts-sapi-1.0.0.jar
- System twilio-sapi: https://cdn.ioconnectservices.com/cdn/docs/Datadog-APM-Connector/examples/datadog_apis/twilio-sapi-1.0.0.jar
Exchange configurations
Once all the APIs have been downloaded, we need to set up some Exchange configurations.
1. Ensure you have the Datadog APM Connector publish as an asset in your company's Anypoint Platform Exchange.
2. For each one of the APIs imported, update the pom.xml file by replacing every {ORGANIZATION_ID} with your own Anypoint Platform organization ID.
3. In your local maven installation open your settings.xml file. Add your Anypoint Plataform username and password inside the "<servers>" tag. Your server ID in the settings.xml file needs to match exactly with your repository ID in the pom.xml file. You can skip this step if you already have it configured.
4. Anypoint Studio should be able to start downloading the connector from your company's Exchange into your projects. If not happening automatically, please make an update in your pom.xml file or close and reopen each project.
Preparing the run configurations
Once you have all 4 APIs projects imported, and configurations applied, go to Run > Run configurations...
Select all projects to run them simultaneously.
In the Arguments tab in the Program arguments box, put the following:
-Denv=local
In the VM Arguments box, put the following (and please replace dd.host and ddApiKey values with your own):
-Ddd.host={place here your host ip, sample: 127.0.0.1}
-DddApiKey={place here your api key sample: abcdefg123456}
-Ddomain=localhost
-DddAppName1=marketing-eapi-dev
-DddAppName2=messaging-papi-dev
-DddAppName3=contacts-sapi-dev
-DddAppName4=twilio-sapi-dev
-DddService1=marketing-eapi-dev
-DddService2=messaging-papi-dev
-DddService3=contacts-sapi-dev
-DddService4=twilio-sapi-dev
Execution of the APIs
Once installed, use the following curl command to execute the APIs from the Marketing EAPI (please note, calls made by the example APIs shared in this page are just mocked calls).
curl --location --request POST 'http://localhost:8081/api/messages' \
--header 'Content-Type: application/json' \
--data-raw '{
"contactId": "a0f901f1-9105-4c06-9ec6-82f91a963d9c",
"body": "Demo 10/11 - 001"
}'
The Marketing EAPI should return an HTTP status code 201 as a successful response.
Now that the transaction has been executed, you should be able to track the event with the correlation ID in your Datadog instance, which is shared across all systems, in the Datadog > Logs section. Take the below image as a reference of what you would be able to find in your Datadog instance.