update: trace only api calls

This commit is contained in:
Tony Yang
2025-04-17 01:25:48 +08:00
parent c3df80671a
commit ceda1e8c1c
2 changed files with 2 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
import * as Sentry from "@sentry/cloudflare";
export const onRequest = [
Sentry.sentryPagesPlugin((context) => ({
dsn: context.env.SENTRY_DSN,
// Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
}))
];