Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / packages/observability/instrumentation.ts |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | packages/observability/instrumentation.ts |
| Original SHA-256 | 5502b10674c0c61c4c0825e1c84a57d34e6e83b0a16cb30df2b56435638078b9 |
| Git blob SHA | 3752f2eec3f1aa8de35769419d59a529450e424e |
| Reading-copy SHA-256 | 5502b10674c0c61c4c0825e1c84a57d34e6e83b0a16cb30df2b56435638078b9 |
Recovered source transcript
Download complete source text ↓28 lines · 0.7 KB
import { init } from '@sentry/nextjs'
import { IS_DEVELOPMENT } from '@thedaviddias/utils/environment'
import { keys } from './keys'
const opts = {
dsn: keys().NEXT_PUBLIC_SENTRY_DSN,
// Set the environment
environment: process.env.VERCEL_ENV || (IS_DEVELOPMENT ? 'development' : 'production'),
// Adjust sampling rates based on environment
tracesSampleRate: IS_DEVELOPMENT ? 1.0 : 0.1,
// Only enable debug in development and when explicitly required
// This fixes the "Cannot initialize SDK with `debug` option using a non-debug bundle" error
debug: false
}
export const initializeSentry = () => {
if (process.env.NEXT_RUNTIME === 'nodejs') {
init(opts)
}
if (process.env.NEXT_RUNTIME === 'edge') {
init(opts)
}
}