Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions controlplane/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@ SENTRY_DSN=""
SENTRY_SEND_DEFAULT_PII="false"
SENTRY_TRACES_SAMPLE_RATE="1.0"
SENTRY_PROFILE_SESSION_SAMPLE_RATE="1.0"
SENTRY_PROFILE_LIFECYCLE="manual"
SENTRY_EVENT_LOOP_BLOCK_THRESHOLD_MS="100"
1 change: 1 addition & 0 deletions controlplane/src/core/env.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export const envVariables = z
.default('false'),
SENTRY_TRACES_SAMPLE_RATE: z.coerce.number().optional().default(1),
SENTRY_PROFILE_SESSION_SAMPLE_RATE: z.coerce.number().optional().default(1),
SENTRY_PROFILE_LIFECYCLE: z.enum(["manual", "trace"]).optional().default("manual"),
SENTRY_EVENT_LOOP_BLOCK_THRESHOLD_MS: z.coerce.number().optional().default(100),
})
.refine((input) => {
Expand Down
2 changes: 2 additions & 0 deletions controlplane/src/core/sentry.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface SentryConfig {
dsn: string;
eventLoopBlockIntegrationThresholdMs?: number;
profileSessionSampleRate?: number;
profileLifecycle?: 'manual' | 'trace';
sendDefaultPii?: boolean;
tracesSampleRate?: number;
};
Expand All @@ -26,6 +27,7 @@ export function init(opts: SentryConfig) {
profileSessionSampleRate: opts.sentry.profileSessionSampleRate,
sendDefaultPii: opts.sentry.sendDefaultPii,
tracesSampleRate: opts.sentry.tracesSampleRate,
profileLifecycle: opts.sentry.profileLifecycle
});
}
}
2 changes: 2 additions & 0 deletions controlplane/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const {
SENTRY_SEND_DEFAULT_PII,
SENTRY_TRACES_SAMPLE_RATE,
SENTRY_PROFILE_SESSION_SAMPLE_RATE,
SENTRY_PROFILE_LIFECYCLE,
SENTRY_EVENT_LOOP_BLOCK_THRESHOLD_MS,
} = envVariables.parse(process.env);

Expand Down Expand Up @@ -187,6 +188,7 @@ if (SENTRY_ENABLED) {
dsn: SENTRY_DSN,
eventLoopBlockIntegrationThresholdMs: SENTRY_EVENT_LOOP_BLOCK_THRESHOLD_MS,
profileSessionSampleRate: SENTRY_PROFILE_SESSION_SAMPLE_RATE,
profileLifecycle: SENTRY_PROFILE_LIFECYCLE,
sendDefaultPii: SENTRY_SEND_DEFAULT_PII,
tracesSampleRate: SENTRY_TRACES_SAMPLE_RATE,
},
Expand Down
Loading