chore: enable sentry tracing (#7688)

* chore: enable sentry tracing

* add comment

* change to 10 percent

---------

Co-authored-by: jackkav <jackkav@gmail.com>
This commit is contained in:
Curry Yang 2024-07-10 16:14:10 +08:00 committed by GitHub
parent 1f34acd09d
commit e798634e42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,6 +20,13 @@ function sentryWatchUserInfo() {
}
export function initializeSentry() {
Sentry.init(SENTRY_OPTIONS);
Sentry.init({
...SENTRY_OPTIONS,
// enable sentry tracing
integrations: [Sentry.browserTracingIntegration()],
// set 0.1 sample rate for traces, only send 10% of traces, and check whether the limit is exceeded
// https://konghq.sentry.io/settings/billing/overview/?category=transactions
tracesSampleRate: 0.1,
});
sentryWatchUserInfo();
}