-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(metrics): Add comments for v7 configuration (#10154)
- Loading branch information
1 parent
74c358b
commit 3d840bd
Showing
9 changed files
with
62 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
To use metrics with astro, first [manually setup up the SDK as per the Astro SDK docs](/platforms/javascript/guides/astro/manual-setup/#manual-sdk-initialization). | ||
|
||
Metrics work out of the box by calling `Sentry.init` no further setup is required. | ||
Metrics work out of the box by calling `Sentry.init`, no further setup is required. | ||
|
||
```JavaScript | ||
// sentry.client.config.js | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
// Only needed for SDK versions < 8.0.0 | ||
// integrations: [ | ||
// Sentry.metrics.metricsAggregatorIntegration(), | ||
// ], | ||
}); | ||
``` | ||
|
||
```JavaScript | ||
// sentry.server.config.js | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
// Only needed for SDK versions < 8.0.0 | ||
// _experiments: { | ||
// metricsAggregator: true, | ||
// }, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
To configure metrics, add the `metricsAggregator` experimental option to your `Sentry.init` call. | ||
Metrics work out of the box by calling `Sentry.init`, no further setup is required. | ||
|
||
```JavaScript | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
_experiments: { | ||
metricsAggregator: true, | ||
}, | ||
// Only needed for SDK versions < 8.0.0 | ||
// _experiments: { | ||
// metricsAggregator: true, | ||
// }, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
To configure metrics, add the `metricsAggregator` experimental option to your `Sentry.init` call. | ||
Metrics work out of the box by calling `Sentry.init`, no further setup is required. | ||
|
||
```JavaScript | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
_experiments: { | ||
metricsAggregator: true, | ||
}, | ||
// Only needed for SDK versions < 8.0.0 | ||
// _experiments: { | ||
// metricsAggregator: true, | ||
// }, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
To configure metrics, add the `metricsAggregator` experimental option to your `Sentry.init` call in your main process. | ||
Metrics work out of the box by calling `Sentry.init`, no further setup is required. | ||
|
||
```JavaScript | ||
import * as Sentry from '@sentry/electron/main'; | ||
|
||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
_experiments: { | ||
metricsAggregator: true, | ||
}, | ||
// Only needed for SDK versions < 8.0.0 | ||
// _experiments: { | ||
// metricsAggregator: true, | ||
// }, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
Metrics work out of the box by calling `Sentry.init` no further setup is required. | ||
Metrics work out of the box by calling `Sentry.init`, no further setup is required. | ||
|
||
```JavaScript | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
// Only needed for SDK versions < 8.0.0 | ||
// integrations: [ | ||
// Sentry.metrics.metricsAggregatorIntegration(), | ||
// ], | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
Metrics work out of the box by calling `Sentry.init` no further setup is required. | ||
Metrics work out of the box by calling `Sentry.init`, no further setup is required. | ||
|
||
```JavaScript | ||
// sentry.client.config.js | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
// Only needed for SDK versions < 8.0.0 | ||
// integrations: [ | ||
// Sentry.metrics.metricsAggregatorIntegration(), | ||
// ], | ||
}); | ||
``` | ||
|
||
```JavaScript | ||
// instrumentation.js | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
// Only needed for SDK versions < 8.0.0 | ||
// _experiments: { | ||
// metricsAggregator: true, | ||
// }, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
To configure metrics, add the `metricsAggregator` experimental option to your `Sentry.init` call. | ||
Metrics work out of the box by calling `Sentry.init`, no further setup is required. | ||
|
||
```JavaScript | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
_experiments: { | ||
metricsAggregator: true, | ||
}, | ||
// Only needed for SDK versions < 8.0.0 | ||
// _experiments: { | ||
// metricsAggregator: true, | ||
// }, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
Metrics work out of the box by calling `Sentry.init` no further setup is required. | ||
Metrics work out of the box by calling `Sentry.init`, no further setup is required. | ||
|
||
```JavaScript | ||
// entry.client.tsx | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
// Only needed for SDK versions < 8.0.0 | ||
// integrations: [ | ||
// Sentry.metrics.metricsAggregatorIntegration(), | ||
// ], | ||
}); | ||
``` | ||
|
||
```JavaScript | ||
// entry.server.tsx | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
// Only needed for SDK versions < 8.0.0 | ||
// _experiments: { | ||
// metricsAggregator: true, | ||
// }, | ||
}); | ||
``` |
10 changes: 9 additions & 1 deletion
10
platform-includes/metrics/configure/javascript.sveltekit.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
Metrics work out of the box by calling `Sentry.init` no further setup is required. | ||
Metrics work out of the box by calling `Sentry.init`, no further setup is required. | ||
|
||
```JavaScript | ||
// hooks.client.js | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
// Only needed for SDK versions < 8.0.0 | ||
// integrations: [ | ||
// Sentry.metrics.metricsAggregatorIntegration(), | ||
// ], | ||
}); | ||
``` | ||
|
||
```JavaScript | ||
// hooks.server.js | ||
Sentry.init({ | ||
dsn: '___PUBLIC_DSN___', | ||
// Only needed for SDK versions < 8.0.0 | ||
// _experiments: { | ||
// metricsAggregator: true, | ||
// }, | ||
}); | ||
``` |