File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/node-core/src/cron Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1- import { captureException , withMonitor } from '@sentry/core' ;
1+ import { captureException , type MonitorConfig , withMonitor } from '@sentry/core' ;
22import { replaceCronNames } from './common' ;
33
44export interface NodeCronOptions {
@@ -28,7 +28,10 @@ export interface NodeCron {
2828 * );
2929 * ```
3030 */
31- export function instrumentNodeCron < T > ( lib : Partial < NodeCron > & T ) : T {
31+ export function instrumentNodeCron < T > (
32+ lib : Partial < NodeCron > & T ,
33+ monitorConfig : Pick < MonitorConfig , 'isolateTrace' > = { } ,
34+ ) : T {
3235 return new Proxy ( lib , {
3336 get ( target , prop ) {
3437 if ( prop === 'schedule' && target . schedule ) {
@@ -65,6 +68,7 @@ export function instrumentNodeCron<T>(lib: Partial<NodeCron> & T): T {
6568 {
6669 schedule : { type : 'crontab' , value : replaceCronNames ( expression ) } ,
6770 timezone,
71+ ...monitorConfig ,
6872 } ,
6973 ) ;
7074 } ;
You can’t perform that action at this time.
0 commit comments