index.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { addTracingExtensions, applySdkMetadata } from '@sentry/core';
  2. export { Span, Transaction } from '@sentry/core';
  3. import { getDefaultIntegrations, init as init$1 } from '@sentry/vercel-edge';
  4. export * from '@sentry/vercel-edge';
  5. import { isBuild } from '../common/utils/isBuild.js';
  6. import { rewriteFramesIntegration } from './rewriteFramesIntegration.js';
  7. export { rewriteFramesIntegration } from './rewriteFramesIntegration.js';
  8. export { withSentryGetStaticProps, wrapGetStaticPropsWithSentry } from '../common/wrapGetStaticPropsWithSentry.js';
  9. export { withSentryServerSideGetInitialProps, wrapGetInitialPropsWithSentry } from '../common/wrapGetInitialPropsWithSentry.js';
  10. export { withSentryServerSideAppGetInitialProps, wrapAppGetInitialPropsWithSentry } from '../common/wrapAppGetInitialPropsWithSentry.js';
  11. export { withSentryServerSideDocumentGetInitialProps, wrapDocumentGetInitialPropsWithSentry } from '../common/wrapDocumentGetInitialPropsWithSentry.js';
  12. export { withSentryServerSideErrorGetInitialProps, wrapErrorGetInitialPropsWithSentry } from '../common/wrapErrorGetInitialPropsWithSentry.js';
  13. export { withSentryGetServerSideProps, wrapGetServerSidePropsWithSentry } from '../common/wrapGetServerSidePropsWithSentry.js';
  14. export { wrapServerComponentWithSentry } from '../common/wrapServerComponentWithSentry.js';
  15. export { wrapRouteHandlerWithSentry } from '../common/wrapRouteHandlerWithSentry.js';
  16. export { wrapApiHandlerWithSentryVercelCrons } from '../common/wrapApiHandlerWithSentryVercelCrons.js';
  17. export { wrapMiddlewareWithSentry } from '../common/wrapMiddlewareWithSentry.js';
  18. export { wrapPageComponentWithSentry } from '../common/wrapPageComponentWithSentry.js';
  19. export { wrapGenerationFunctionWithSentry } from '../common/wrapGenerationFunctionWithSentry.js';
  20. export { withServerActionInstrumentation } from '../common/withServerActionInstrumentation.js';
  21. export { withSentryAPI, wrapApiHandlerWithSentry } from './wrapApiHandlerWithSentry.js';
  22. /** Inits the Sentry NextJS SDK on the Edge Runtime. */
  23. function init(options = {}) {
  24. addTracingExtensions();
  25. if (isBuild()) {
  26. return;
  27. }
  28. const customDefaultIntegrations = [...getDefaultIntegrations(options), rewriteFramesIntegration()];
  29. const opts = {
  30. defaultIntegrations: customDefaultIntegrations,
  31. ...options,
  32. };
  33. applySdkMetadata(opts, 'nextjs');
  34. init$1(opts);
  35. }
  36. /**
  37. * Just a passthrough in case this is imported from the client.
  38. */
  39. function withSentryConfig(exportedUserNextConfig) {
  40. return exportedUserNextConfig;
  41. }
  42. export { init, withSentryConfig };
  43. //# sourceMappingURL=index.js.map