Set the Level

The level - similar to logging levels - is generally added by default based on the integration. You can also override it within an event.

To set the level out of scope, you can call captureMessage() per event:

Copied
Sentry.captureMessage("this is a debug message", "debug");

To set the level within scope, you can call setLevel():

Copied
Sentry.configureScope(function(scope) {
  scope.setLevel(Sentry.Severity.Warning);
});

or per event:

Copied
Sentry.withScope(function(scope) {
  scope.setLevel("info");
  Sentry.captureException("info");
});