roarr-sentry

Sentry integration that adds Roarr logs to Sentry breadcrumbs.

OTHER License

Downloads
3K
Stars
5
Committers
4

Roarr Sentry Integration

Sentry integration that adds Roarr logs to Sentry breadcrumbs.

Motivation

Sentry 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.

Usage

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);
      },
    }),
  ],
});