Hi, I have two apps in Django and Angular.
I want to set log level in JS Sentry just like it is in python but I can’t find similar solution to LoggingIntegration
.
This is what I figure out:
Sentry.init({
dsn: 'xxxxxx',
environment: 'devel',
maxBreadcrumbs: 20
integrations: [
new ExtraErrorData(), // adding not-native element of error object
new CaptureConsole({ // captures all Console API calls
levels: [ 'error' ]
})
],
beforeBreadcrumb(breadcrumb: Sentry.Breadcrumb, hint: Sentry.BreadcrumbHint) {
return breadcrumb.level === Sentry.Severity.fromString('warning')
? breadcrumb : null;
},
beforeSend(event: Sentry.Event, hint: Sentry.EventHint) {
return event.level === Sentry.Severity.fromString('error') ? event : null;
},
});
This solution only send error
level event and warning
level for breadcrumb but how to send above levels to sentry?