2023-02-15 17:28:20 +01:00
|
|
|
import apm from "dd-trace"
|
|
|
|
|
|
|
|
// enable APM if configured
|
|
|
|
if (process.env.DD_APM_ENABLED) {
|
|
|
|
console.log("Starting dd-trace")
|
2024-01-05 16:08:43 +01:00
|
|
|
apm.init({
|
|
|
|
// @ts-ignore for some reason dd-trace types don't include this options,
|
|
|
|
// even though it's spoken about in the docs.
|
|
|
|
debug: process.env.DD_ENV === "qa",
|
|
|
|
})
|
2023-02-15 17:28:20 +01:00
|
|
|
}
|