Skip to content

Commit

Permalink
Patch up rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Aug 19, 2022
1 parent dc9988c commit a561697
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const origGetStaticProps = userPageModule.getStaticProps;
const origGetServerSideProps = userPageModule.getServerSideProps;

if (typeof origGetInitialProps === 'function') {
pageComponent.getInitialProps = Sentry.withSentryGetInitialProps(
pageComponent.getInitialProps = Sentry.withSentryServerSideGetInitialProps(
origGetInitialProps,
'__ROUTE__',
) as NextPageComponent['getInitialProps'];
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/src/config/wrappers/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { withSentryGetStaticProps } from './withSentryGetStaticProps';
export { withSentryGetInitialProps } from './withSentryGetInitialProps';
export { withSentryGetServerSideProps } from './withSentryGetServerSideProps';
export { withSentryServerSideGetInitialProps } from './withSentryServerSideGetInitialProps';
26 changes: 0 additions & 26 deletions packages/nextjs/src/config/wrappers/withSentryGetInitialProps.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { hasTracingEnabled } from '@sentry/tracing';
import { GetServerSideProps } from 'next';

import { isBuild } from '../../utils/isBuild';
Expand Down
6 changes: 5 additions & 1 deletion packages/nextjs/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ function addServerIntegrations(options: NextjsOptions): void {
export type { SentryWebpackPluginOptions } from './config/types';
export { withSentryConfig } from './config';
export { isBuild } from './utils/isBuild';
export { withSentryGetServerSideProps, withSentryGetStaticProps, withSentryGetInitialProps } from './config/wrappers';
export {
withSentryGetServerSideProps,
withSentryGetStaticProps,
withSentryServerSideGetInitialProps,
} from './config/wrappers';
export { withSentry } from './utils/withSentry';

// Wrap various server methods to enable error monitoring and tracing. (Note: This only happens for non-Vercel
Expand Down

0 comments on commit a561697

Please sign in to comment.