Skip to content

Commit 66bf06f

Browse files
authored
feat: Update min js sdk version for logging and update console logging snippet (#14614)
In `9.41.0` of the JS SDK, we dropped the experimental `enableLogs` option. Given we document snippets without the experimental option everywhere, let's bump the min version in the docs: https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#9410 This is the version we will lock in for GA. While I was here, I also cleaned up the `consoleLoggingIntegration` so that we follow the order log < warn < error.
1 parent e29b50b commit 66bf06f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

includes/logs/javascript-console-logging-integration.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ You can also configure the SDK to send logs via the JavaScript console object, u
66
Sentry.init({
77
dsn: "___PUBLIC_DSN___",
88
integrations: [
9-
// send console.log, console.error, and console.warn calls as logs to Sentry
10-
Sentry.consoleLoggingIntegration({ levels: ["log", "error", "warn"] }),
9+
// send console.log, console.warn, and console.error calls as logs to Sentry
10+
Sentry.consoleLoggingIntegration({ levels: ["log", "warn", "error"] }),
1111
],
1212
});
1313
```

platform-includes/llm-rules-logs/javascript.nextjs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Sentry.init({
3232
Sentry.init({
3333
dsn: "https://[email protected]/0",
3434
integrations: [
35-
// send console.log, console.error, and console.warn calls as logs to Sentry
36-
Sentry.consoleLoggingIntegration({ levels: ["log", "error", "warn"] }),
35+
// send console.log, console.warn, and console.error calls as logs to Sentry
36+
Sentry.consoleLoggingIntegration({ levels: ["log", "warn", "error"] }),
3737
],
3838
});
3939
```

platform-includes/llm-rules-logs/javascript.node.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Sentry.init({
3232
Sentry.init({
3333
dsn: "https://[email protected]/0",
3434
integrations: [
35-
// send console.log, console.error, and console.warn calls as logs to Sentry
36-
Sentry.consoleLoggingIntegration({ levels: ["log", "error", "warn"] }),
35+
// send console.log, console.warn, and console.error calls as logs to Sentry
36+
Sentry.consoleLoggingIntegration({ levels: ["log", "warn", "error"] }),
3737
],
3838
});
3939
```

platform-includes/logs/requirements/javascript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Logs for JavaScript are supported in Sentry JavaScript SDK version `9.17.0` and above.
1+
Logs for JavaScript are supported in Sentry JavaScript SDK version `9.41.0` and above.
22

33
<PlatformSection supported={["javascript"]}>
44

0 commit comments

Comments
 (0)