diff --git a/src/includes/enriching-events/breadcrumbs/breadcrumbs-example/javascript.mdx b/src/includes/enriching-events/breadcrumbs/breadcrumbs-example/javascript.mdx index 5ce3dd4419bea..2b8e35da637fc 100644 --- a/src/includes/enriching-events/breadcrumbs/breadcrumbs-example/javascript.mdx +++ b/src/includes/enriching-events/breadcrumbs/breadcrumbs-example/javascript.mdx @@ -2,6 +2,6 @@ Sentry.addBreadcrumb({ category: "auth", message: "Authenticated user " + user.email, - level: Sentry.Severity.Info, + level: "info", }); ``` diff --git a/src/includes/set-level/javascript.mdx b/src/includes/set-level/javascript.mdx index b2054bba043fe..f7adc31d9c503 100644 --- a/src/includes/set-level/javascript.mdx +++ b/src/includes/set-level/javascript.mdx @@ -4,11 +4,13 @@ To set the level out of scope, you can call `captureMessage()` per event: Sentry.captureMessage("this is a debug message", "debug"); ``` +Available levels are `"fatal"`, `"critical"`, `"error"`, `"warning"`, `"log"`, `"info"`, and `"debug"`. + To set the level within scope, you can call `setLevel()`: ```javascript Sentry.configureScope(function(scope) { - scope.setLevel(Sentry.Severity.Warning); + scope.setLevel("warning"); }); ``` @@ -20,8 +22,8 @@ Sentry.withScope(function(scope) { // The exception has the event level set by the scope (info). Sentry.captureException(new Error("custom error")); - }); + // Outside of withScope, the Event level will have their previous value restored. // The exception has the event level set (error). Sentry.captureException(new Error("custom error 2")); diff --git a/src/platforms/common/enriching-events/breadcrumbs.mdx b/src/platforms/common/enriching-events/breadcrumbs.mdx index 0066bbc0c07b9..da17a653e9e2b 100644 --- a/src/platforms/common/enriching-events/breadcrumbs.mdx +++ b/src/platforms/common/enriching-events/breadcrumbs.mdx @@ -41,6 +41,12 @@ The available breadcrumb keys are `type`, `category`, `message`, `level`, `times + + +You can choose from the following breadcrumb log levels: `"fatal"`, `"critical"`, `"error"`, `"warning"`, `"log"`, `"info"`, and `"debug"`. + + + ## Automatic Breadcrumbs diff --git a/src/platforms/javascript/common/troubleshooting/index.mdx b/src/platforms/javascript/common/troubleshooting/index.mdx index 9c392ef24e8b9..c5772d7e29fbe 100644 --- a/src/platforms/javascript/common/troubleshooting/index.mdx +++ b/src/platforms/javascript/common/troubleshooting/index.mdx @@ -395,12 +395,12 @@ document.body.addEventListener( if (event.target.tagName === "IMG") { Sentry.captureMessage( `Failed to load image: ${event.target.src}`, - Sentry.Severity.Warning + "warning" ); } else if (event.target.tagName === "LINK") { Sentry.captureMessage( `Failed to load css: ${event.target.href}`, - Sentry.Severity.Warning + "warning" ); } },