I am trying to integrate datadog log monitoring with strapi, logging works but the injection doesnt work

I was facing the same problem here and I’ve found a way to make it work using strapi v4.

No need to insert the init() function inside src/index.js → register(), we can place it as a new file following the Datadog docs.

I wasn’t able to check the tracer information on the Datadog APM tab because I didn’t have a Datalog Agent running.

image

When we use the dd-trace library, it assumes by default that we’re running this agent on localhost:8125 (We can modify it inside the init() function).
All I had to do was follow the steps to install this agent listed on the Datadog guide(Datadog: Log In) and after setting up this agent I was able to check the APM metrics.