Skip to content

Commit

Permalink
Test with fixed hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
dneilroth committed Aug 26, 2024
1 parent 57b3451 commit d4758cd
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions apps/web/tracer.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
import ddtracer from 'dd-trace';
import { logger } from 'apps/web/src/utils/logger';

const { tracer } = ddtracer;
tracer.init({
service: process.env.CODEFLOW_PROJECT_NAME,
}); // initialized in a different file to avoid hoisting.
// Enables tracking performance trends across versions. Using commit hash as
// code changes most often result in performance changes (vs deploys).
//
// Codeflow Docs: https://confluence.coinbase-corp.com/pages/viewpage.action?pageId=1172681623
// Datadog Docs: https://datadoghq.dev/dd-trace-js/
version: process.env.CODEFLOW_COMMIT_HASH,
profiling: true,
logInjection: true,
startupLogs: true,
logger: {
error: (err) => logger.error(err),
warn: (message) => logger.warn(message),
info: (message) => logger.info(message),
debug: (message) => logger.debug(message),
},
dogstatsd: {
hostname: '10.166.21.89',
},
});

tracer.use('http', {
service: process.env.CODEFLOW_SERVICE_NAME,
enabled: true,
});
// export declare const tracer: Tracer;

export default tracer;

0 comments on commit d4758cd

Please sign in to comment.