Skip to content

Commit

Permalink
Add a line of debug for staging/production so we can see that datadog…
Browse files Browse the repository at this point in the history
… is being initialised
  • Loading branch information
stefl committed Aug 29, 2024
1 parent 51fe224 commit 82f3975
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"clean": "rm -rf .next .turbo node_modules",
"dev": "concurrently \"pnpm dev-server\" \"node scripts/local-dev.mjs\"",
"dev-server": "pnpm with-env next dev --port 2525 | pino-pretty -C",
"dev-trace-deprecation": "NODE_OPTIONS=\"--trace-deprecation\" next dev --port 2525 | pino-pretty -C",
"lint": "next lint",
"lint-fix": "next lint --fix",
"start": "next start",
Expand Down
9 changes: 7 additions & 2 deletions packages/core/src/tracing/baseTracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function initializeTracer(options: DatadogOptions) {
`Initialized no-op tracer for ${isTest ? "test" : "local development"} environment`,
);
} else {
tracer.init({
const initialisationOptions = {
env: options.env || environment,
service: options.service || "oak-ai",
hostname,
Expand All @@ -45,7 +45,12 @@ export function initializeTracer(options: DatadogOptions) {
sampleRate: options.sampleRate || 1,
profiling: options.profiling !== undefined ? options.profiling : true,
plugins: options.plugins !== undefined ? options.plugins : false,
});
};
console.log(
"Initializing Datadog tracer with options",
initialisationOptions,
);
tracer.init(initialisationOptions);
}
}

Expand Down

0 comments on commit 82f3975

Please sign in to comment.