Skip to content

Commit

Permalink
Add section explaining possible breadcrumb levels
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Apr 14, 2022
1 parent 4a1fa5c commit 2cdeaaf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/includes/set-level/javascript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ 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
Expand Down
6 changes: 6 additions & 0 deletions src/platforms/common/enriching-events/breadcrumbs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ The available breadcrumb keys are `type`, `category`, `message`, `level`, `times

</PlatformSection>

<PlatformSection supported={["javascript", "node"]}>

You can choose from the following breadcrumb log levels: `"fatal"`, `"critical"`, `"error"`, `"warning"`, `"log"`, `"info"`, and `"debug"`.

</PlatformSection>

<PlatformSection notSupported={["native"]}>

## Automatic Breadcrumbs
Expand Down
4 changes: 2 additions & 2 deletions src/platforms/javascript/common/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,12 @@ document.body.addEventListener(
if (event.target.tagName === "IMG") {
Sentry.captureMessage(
`Failed to load image: ${event.target.src}`,
"warning" // message severity level
"warning"
);
} else if (event.target.tagName === "LINK") {
Sentry.captureMessage(
`Failed to load css: ${event.target.href}`,
"warning" // message severity level
"warning"
);
}
},
Expand Down

0 comments on commit 2cdeaaf

Please sign in to comment.