Skip to content

Commit 2cdeaaf

Browse files
author
Luca Forstner
committed
Add section explaining possible breadcrumb levels
1 parent 4a1fa5c commit 2cdeaaf

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/includes/set-level/javascript.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ To set the level out of scope, you can call `captureMessage()` per event:
44
Sentry.captureMessage("this is a debug message", "debug");
55
```
66

7+
Available levels are `"fatal"`, `"critical"`, `"error"`, `"warning"`, `"log"`, `"info"`, and `"debug"`.
8+
79
To set the level within scope, you can call `setLevel()`:
810

911
```javascript

src/platforms/common/enriching-events/breadcrumbs.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ The available breadcrumb keys are `type`, `category`, `message`, `level`, `times
4242

4343
</PlatformSection>
4444

45+
<PlatformSection supported={["javascript", "node"]}>
46+
47+
You can choose from the following breadcrumb log levels: `"fatal"`, `"critical"`, `"error"`, `"warning"`, `"log"`, `"info"`, and `"debug"`.
48+
49+
</PlatformSection>
50+
4551
<PlatformSection notSupported={["native"]}>
4652

4753
## Automatic Breadcrumbs

src/platforms/javascript/common/troubleshooting/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,12 +389,12 @@ document.body.addEventListener(
389389
if (event.target.tagName === "IMG") {
390390
Sentry.captureMessage(
391391
`Failed to load image: ${event.target.src}`,
392-
"warning" // message severity level
392+
"warning"
393393
);
394394
} else if (event.target.tagName === "LINK") {
395395
Sentry.captureMessage(
396396
`Failed to load css: ${event.target.href}`,
397-
"warning" // message severity level
397+
"warning"
398398
);
399399
}
400400
},

0 commit comments

Comments
 (0)