chore: Move tracing decorators into the codebase (#4623)

* Vendorize tracing, finally fix service name issues

* Upgrade datadaog-metrics, rename decorators -> tracing

* lint
This commit is contained in:
Tom Moor
2022-12-31 12:54:51 +00:00
committed by GitHub
parent 1e036ebd0e
commit c6fb764631
26 changed files with 501 additions and 190 deletions

View File

@@ -29,13 +29,8 @@ class Metrics {
return;
}
const instanceId = process.env.INSTANCE_ID || process.env.HEROKU_DYNO_ID;
if (!instanceId) {
throw new Error(
"INSTANCE_ID or HEROKU_DYNO_ID must be set when using DataDog"
);
}
const instanceId =
process.env.INSTANCE_ID || process.env.HEROKU_DYNO_ID || process.pid;
return ddMetrics.gauge(key, value, [...tags, `instance:${instanceId}`]);
}