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 {
@@ -32,7 +32,10 @@ export interface NodeCron {
3232 * );
3333 * ```
3434 */
35- export function instrumentNodeCron < T > ( lib : Partial < NodeCron > & T ) : T {
35+ export function instrumentNodeCron < T > (
36+ lib : Partial < NodeCron > & T ,
37+ monitorConfig : Pick < MonitorConfig , 'isolateTrace' > = { } ,
38+ ) : T {
3639 return new Proxy ( lib , {
3740 get ( target , prop ) {
3841 if ( prop === 'schedule' && target . schedule ) {
@@ -69,6 +72,7 @@ export function instrumentNodeCron<T>(lib: Partial<NodeCron> & T): T {
6972 {
7073 schedule : { type : 'crontab' , value : replaceCronNames ( expression ) } ,
7174 timezone,
75+ ...monitorConfig ,
7276 } ,
7377 ) ;
7478 } ;
You can’t perform that action at this time.
0 commit comments