Skip to content

Commit 1e80146

Browse files
ArthurKnausmatejminar
authored andcommitted
feat(metrics): Add comments for v7 configuration (#10154)
1 parent 2677410 commit 1e80146

File tree

9 files changed

+62
-21
lines changed

9 files changed

+62
-21
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
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).
22

3-
Metrics work out of the box by calling `Sentry.init` no further setup is required.
3+
Metrics work out of the box by calling `Sentry.init`, no further setup is required.
44

55
```JavaScript
66
// sentry.client.config.js
77
Sentry.init({
88
dsn: '___PUBLIC_DSN___',
9+
// Only needed for SDK versions < 8.0.0
10+
// integrations: [
11+
// Sentry.metrics.metricsAggregatorIntegration(),
12+
// ],
913
});
1014
```
1115

1216
```JavaScript
1317
// sentry.server.config.js
1418
Sentry.init({
1519
dsn: '___PUBLIC_DSN___',
20+
// Only needed for SDK versions < 8.0.0
21+
// _experiments: {
22+
// metricsAggregator: true,
23+
// },
1624
});
1725
```
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
To configure metrics, add the `metricsAggregator` experimental option to your `Sentry.init` call.
1+
Metrics work out of the box by calling `Sentry.init`, no further setup is required.
22

33
```JavaScript
44
Sentry.init({
55
dsn: '___PUBLIC_DSN___',
6-
_experiments: {
7-
metricsAggregator: true,
8-
},
6+
// Only needed for SDK versions < 8.0.0
7+
// _experiments: {
8+
// metricsAggregator: true,
9+
// },
910
});
1011
```
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
To configure metrics, add the `metricsAggregator` experimental option to your `Sentry.init` call.
1+
Metrics work out of the box by calling `Sentry.init`, no further setup is required.
22

33
```JavaScript
44
Sentry.init({
55
dsn: '___PUBLIC_DSN___',
6-
_experiments: {
7-
metricsAggregator: true,
8-
},
6+
// Only needed for SDK versions < 8.0.0
7+
// _experiments: {
8+
// metricsAggregator: true,
9+
// },
910
});
1011
```
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
To configure metrics, add the `metricsAggregator` experimental option to your `Sentry.init` call in your main process.
1+
Metrics work out of the box by calling `Sentry.init`, no further setup is required.
22

33
```JavaScript
44
import * as Sentry from '@sentry/electron/main';
55

66
Sentry.init({
77
dsn: '___PUBLIC_DSN___',
8-
_experiments: {
9-
metricsAggregator: true,
10-
},
8+
// Only needed for SDK versions < 8.0.0
9+
// _experiments: {
10+
// metricsAggregator: true,
11+
// },
1112
});
1213
```
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
Metrics work out of the box by calling `Sentry.init` no further setup is required.
1+
Metrics work out of the box by calling `Sentry.init`, no further setup is required.
22

33
```JavaScript
44
Sentry.init({
55
dsn: '___PUBLIC_DSN___',
6+
// Only needed for SDK versions < 8.0.0
7+
// integrations: [
8+
// Sentry.metrics.metricsAggregatorIntegration(),
9+
// ],
610
});
711
```
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1-
Metrics work out of the box by calling `Sentry.init` no further setup is required.
1+
Metrics work out of the box by calling `Sentry.init`, no further setup is required.
22

33
```JavaScript
44
// sentry.client.config.js
55
Sentry.init({
66
dsn: '___PUBLIC_DSN___',
7+
// Only needed for SDK versions < 8.0.0
8+
// integrations: [
9+
// Sentry.metrics.metricsAggregatorIntegration(),
10+
// ],
711
});
812
```
913

1014
```JavaScript
15+
// instrumentation.js
1116
Sentry.init({
1217
dsn: '___PUBLIC_DSN___',
18+
// Only needed for SDK versions < 8.0.0
19+
// _experiments: {
20+
// metricsAggregator: true,
21+
// },
1322
});
1423
```
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
To configure metrics, add the `metricsAggregator` experimental option to your `Sentry.init` call.
1+
Metrics work out of the box by calling `Sentry.init`, no further setup is required.
22

33
```JavaScript
44
Sentry.init({
55
dsn: '___PUBLIC_DSN___',
6-
_experiments: {
7-
metricsAggregator: true,
8-
},
6+
// Only needed for SDK versions < 8.0.0
7+
// _experiments: {
8+
// metricsAggregator: true,
9+
// },
910
});
1011
```
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
Metrics work out of the box by calling `Sentry.init` no further setup is required.
1+
Metrics work out of the box by calling `Sentry.init`, no further setup is required.
22

33
```JavaScript
44
// entry.client.tsx
55
Sentry.init({
66
dsn: '___PUBLIC_DSN___',
7+
// Only needed for SDK versions < 8.0.0
8+
// integrations: [
9+
// Sentry.metrics.metricsAggregatorIntegration(),
10+
// ],
711
});
812
```
913

1014
```JavaScript
1115
// entry.server.tsx
1216
Sentry.init({
1317
dsn: '___PUBLIC_DSN___',
18+
// Only needed for SDK versions < 8.0.0
19+
// _experiments: {
20+
// metricsAggregator: true,
21+
// },
1422
});
1523
```
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
Metrics work out of the box by calling `Sentry.init` no further setup is required.
1+
Metrics work out of the box by calling `Sentry.init`, no further setup is required.
22

33
```JavaScript
44
// hooks.client.js
55
Sentry.init({
66
dsn: '___PUBLIC_DSN___',
7+
// Only needed for SDK versions < 8.0.0
8+
// integrations: [
9+
// Sentry.metrics.metricsAggregatorIntegration(),
10+
// ],
711
});
812
```
913

1014
```JavaScript
1115
// hooks.server.js
1216
Sentry.init({
1317
dsn: '___PUBLIC_DSN___',
18+
// Only needed for SDK versions < 8.0.0
19+
// _experiments: {
20+
// metricsAggregator: true,
21+
// },
1422
});
1523
```

0 commit comments

Comments
 (0)