MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / monitoredTick

Function monitoredTick

packages/node-core/src/cron/cron.ts:95–116  ·  view source on GitHub ↗
(context: unknown, onComplete?: unknown)

Source from the content-addressed store, hash-verified

93 const cronString = replaceCronNames(cronTime);
94
95 async function monitoredTick(context: unknown, onComplete?: unknown): Promise<void> {
96 return withMonitor(
97 monitorSlug,
98 async () => {
99 try {
100 await onTick(context, onComplete);
101 } catch (e) {
102 captureException(e, {
103 mechanism: {
104 handled: false,
105 type: 'auto.function.cron.instrumentCron',
106 },
107 });
108 throw e;
109 }
110 },
111 {
112 schedule: { type: 'crontab', value: cronString },
113 timezone: timeZone || undefined,
114 },
115 );
116 }
117
118 return new target(cronTime, monitoredTick, onComplete, start, timeZone, ...rest);
119 },

Callers

nothing calls this directly

Calls 2

withMonitorFunction · 0.90
captureExceptionFunction · 0.90

Tested by

no test coverage detected