-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
790a86a
commit b178a15
Showing
5 changed files
with
18 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
import opentelemetry from '@opentelemetry/sdk-node' | ||
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http' | ||
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node' | ||
import { env } from '@/env' | ||
import Sentry from '@sentry/node' | ||
import { nodeProfilingIntegration } from '@sentry/profiling-node' | ||
|
||
export const sdk = new opentelemetry.NodeSDK({ | ||
traceExporter: new OTLPTraceExporter(), | ||
instrumentations: [ | ||
getNodeAutoInstrumentations({ | ||
// we recommend disabling fs autoinstrumentation since it can be noisy | ||
// and expensive during startup | ||
'@opentelemetry/instrumentation-fs': { | ||
enabled: false, | ||
}, | ||
}), | ||
], | ||
Sentry.init({ | ||
dsn: env.SENTRY_DSN, | ||
integrations: [nodeProfilingIntegration()], | ||
|
||
// Tracing | ||
tracesSampleRate: 1.0, // Capture 100% of the transactions | ||
|
||
// Set sampling rate for profiling - this is relative to tracesSampleRate | ||
profilesSampleRate: 1.0, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters