@roarr/sentry
Version:
Sentry integration that adds Roarr logs to Sentry breadcrumbs.
39 lines (29 loc) • 1.54 kB
Markdown
[](https://travis-ci.com/github/gajus/roarr-sentry)
[](https://coveralls.io/github/gajus/roarr-sentry)
[](https://www.npmjs.org/package/@roarr/sentry)
[](https://github.com/gajus/canonical)
[](https://twitter.com/kuizinas)
[](https://sentry.io/) integration that adds [Roarr](https://github.com/gajus/roarr) logs to Sentry breadcrumbs.
Sentry [breadcrumbs](https://sentry.io/features/breadcrumbs/) allow one to trace down the root cause of an error. Breadcrumbs can include arbitrary data, including log messages. Roarr Sentry integration adds Roarr logs to Sentry breadcrumbs to give a richer context about every issue raised on Sentry.
```js
import {
getCurrentHub,
} from '@sentry/node';
import {
createRoarrSentryIntegration,
} from '@roarr/sentry';
createSentry({
integrations: [
createRoarrSentryIntegration({
addBreadcrumb: (breadcrumb) => {
// Your implementation might vary
const hub = getCurrentHub();
hub.addBreadcrumb(breadcrumb);
},
}),
],
});
```