Skip to content

Commit

Permalink
Update datadog integration to apply default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandromontividiu03 authored and kaiomagalhaes committed Nov 22, 2022
1 parent ea36946 commit b831d06
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/configs/datadog.config.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
import tracer from 'dd-trace';

export const loadDatadogConfig = () => {
const { DATADOG_SERVICE, DATADOG_ENV, DATADOG_HOSTNAME, NODE_ENV, DD_API_KEY } = process.env;

const { DD_API_KEY } = process.env;
if (!DD_API_KEY) {
return;
}

tracer.init({
service: DATADOG_SERVICE,
runtimeMetrics: true,
logInjection: true,
env: DATADOG_ENV || NODE_ENV,
profiling: true,
hostname: DATADOG_HOSTNAME,
});

tracer.use('express');
tracer.init();
};

0 comments on commit b831d06

Please sign in to comment.