breadcrumb.tsx 473 B

1234567891011121314151617
  1. import * as Sentry from '@sentry/react';
  2. import {BreadcrumbLevelType, BreadcrumbType} from 'sentry/types/breadcrumbs';
  3. export function Breadcrumb(params: Partial<Sentry.Breadcrumb> = {}): Sentry.Breadcrumb {
  4. return {
  5. type: BreadcrumbType.NAVIGATION,
  6. category: 'default',
  7. timestamp: new Date().getTime(),
  8. level: BreadcrumbLevelType.INFO,
  9. message: 'https://sourcemaps.io/',
  10. data: {
  11. to: 'https://sourcemaps.io/',
  12. },
  13. ...params,
  14. };
  15. }