chore: Update Sentry to avoid duplicate packages

chore: Pass current release version to Sentry and Datadog
This commit is contained in:
Tom Moor
2021-02-12 16:39:02 -08:00
parent 41df5c74be
commit 2a225d81d2
6 changed files with 82 additions and 123 deletions

View File

@@ -4,7 +4,11 @@ require("dotenv").config({ silent: true });
// If the DataDog agent is installed and the DD_API_KEY environment variable is
// in the environment then we can safely attempt to start the DD tracer
if (process.env.DD_API_KEY) {
require("dd-trace").init();
require("dd-trace").init({
// SOURCE_COMMIT is used by Docker Hub
// SOURCE_VERSION is used by Heroku
version: process.env.SOURCE_COMMIT || process.env.SOURCE_VERSION,
});
}
if (