Skip to content

Commit 16d9d76

Browse files
committed
feat(csr): disabled Sentry distributed tracing
1 parent d85e978 commit 16d9d76

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "surmon.me",
3-
"version": "5.2.1",
3+
"version": "5.2.2",
44
"description": "Surmon.me blog",
55
"author": "Surmon",
66
"license": "MIT",

src/client-entry.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import { getSSRStateValue, getSSRContextData, getSSRContextValue } from '/@/app/
2828
import { Language, LocaleKey } from '/@/locales'
2929
import { APP_VERSION, isDev, isProd } from './configs/app.env'
3030
import { APP_META, IDENTITIES } from '/@/configs/app.config'
31-
import API_CONFIG from '/@/configs/app.api'
3231

3332
import './effects/swiper/style'
3433
import './effects/elements/index.scss'
@@ -99,7 +98,9 @@ if (isProd) {
9998
// replaysOnErrorSampleRate: 1.0,
10099
// MARK: replayIntegration ≈ 110kb+, so disabled by default `Sentry.replayIntegration()`
101100
integrations: [Sentry.browserTracingIntegration({ router })],
102-
tracePropagationTargets: ['localhost', /^\//, new RegExp('^' + API_CONFIG.NODEPRESS.replaceAll('.', '\\.'))]
101+
// Disabling distributed tracing to ensure no trace headers ('sentry-trace', 'baggage') are sent.
102+
// https://docs.sentry.io/platforms/javascript/tracing/distributed-tracing/#disabling-distributed-tracing
103+
tracePropagationTargets: []
103104
})
104105
}
105106

0 commit comments

Comments
 (0)