Skip to content

Commit 88f6dd5

Browse files
authored
Update: Performance JS instructions for CDN and without CDN (#1858)
Updated code example to have options for CDN and without CDN.
1 parent 823c661 commit 88f6dd5

File tree

1 file changed

+12
-0
lines changed
  • src/collections/_documentation/performance-monitoring/configuration

1 file changed

+12
-0
lines changed

src/collections/_documentation/performance-monitoring/configuration/javascript.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,21 @@ The `Tracing` integration is specific to `@sentry/browser` and does not work wit
4444
The `Tracing` integration resides in the `@sentry/apm` package. You can add it to your `Sentry.init` call:
4545

4646
```javascript
47+
// Without CDN
48+
4749
import * as Sentry from '@sentry/browser';
4850
import { Integrations as ApmIntegrations } from '@sentry/apm';
4951

52+
Sentry.init({
53+
dsn: '___PUBLIC_DSN___',
54+
integrations: [
55+
new ApmIntegrations.Tracing(),
56+
],
57+
tracesSampleRate: 0.25,
58+
});
59+
60+
// With CDN
61+
5062
Sentry.init({
5163
dsn: '___PUBLIC_DSN___',
5264
integrations: [

0 commit comments

Comments
 (0)