File tree 3 files changed +7
-4
lines changed
packages/nextjs/src/config
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,10 @@ const PARAMETERIZED_ROUTE = '__FILEPATH__';
21
21
22
22
export const getServerSideProps =
23
23
typeof __ORIG_GSSP__ === 'function'
24
- ? ServerSideSentryNextjsSDK . withSentryGetServerSideProps ( __ORIG_GSSP__ )
24
+ ? ServerSideSentryNextjsSDK . withSentryGetServerSideProps ( __ORIG_GSSP__ , PARAMETERIZED_ROUTE )
25
25
: __ORIG_GSSP__ ;
26
+
26
27
export const getStaticProps =
27
28
typeof __ORIG_GSPROPS__ === 'function'
28
- ? ServerSideSentryNextjsSDK . withSentryGetStaticProps ( __ORIG_GSPROPS__ )
29
+ ? ServerSideSentryNextjsSDK . withSentryGetStaticProps ( __ORIG_GSPROPS__ , PARAMETERIZED_ROUTE )
29
30
: __ORIG_GSPROPS__ ;
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ import { callOriginal } from './wrapperUtils';
5
5
* Create a wrapped version of the user's exported `getServerSideProps` function
6
6
*
7
7
* @param origGetServerSideProps: The user's `getServerSideProps` function
8
+ * @param route: The page's parameterized route
8
9
* @returns A wrapped version of the function
9
10
*/
10
- export function withSentryGetServerSideProps ( origGetServerSideProps : GSSP [ 'fn' ] ) : GSSP [ 'wrappedFn' ] {
11
+ export function withSentryGetServerSideProps ( origGetServerSideProps : GSSP [ 'fn' ] , route : string ) : GSSP [ 'wrappedFn' ] {
11
12
return async function ( context : GSSP [ 'context' ] ) : Promise < GSSP [ 'result' ] > {
12
13
return callOriginal < GSSP > ( origGetServerSideProps , context ) ;
13
14
} ;
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ import { callOriginal } from './wrapperUtils';
5
5
* Create a wrapped version of the user's exported `getStaticProps` function
6
6
*
7
7
* @param origGetStaticProps: The user's `getStaticProps` function
8
+ * @param route: The page's parameterized route
8
9
* @returns A wrapped version of the function
9
10
*/
10
- export function withSentryGetStaticProps ( origGetStaticProps : GSProps [ 'fn' ] ) : GSProps [ 'wrappedFn' ] {
11
+ export function withSentryGetStaticProps ( origGetStaticProps : GSProps [ 'fn' ] , route : string ) : GSProps [ 'wrappedFn' ] {
11
12
return async function ( context : GSProps [ 'context' ] ) : Promise < GSProps [ 'result' ] > {
12
13
return callOriginal < GSProps > ( origGetStaticProps , context ) ;
13
14
} ;
You can’t perform that action at this time.
0 commit comments