MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / captureCheckIn

Function captureCheckIn

packages/core/src/exports.ts:192–204  ·  view source on GitHub ↗
(checkIn: CheckIn, upsertMonitorConfig?: MonitorConfig)

Source from the content-addressed store, hash-verified

190 * to create a monitor automatically when sending a check in.
191 */
192export function captureCheckIn(checkIn: CheckIn, upsertMonitorConfig?: MonitorConfig): string {
193 const scope = getCurrentScope();
194 const client = getClient();
195 if (!client) {
196 DEBUG_BUILD && debug.warn('Cannot capture check-in. No client defined.');
197 } else if (!client.captureCheckIn) {
198 DEBUG_BUILD && debug.warn('Cannot capture check-in. Client does not support sending check-ins.');
199 } else {
200 return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);
201 }
202
203 return uuid4();
204}
205
206/**
207 * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.

Callers 7

sdk.test.tsFile · 0.90
maybeStartCronCheckInFunction · 0.90
maybeCompleteCronCheckInFunction · 0.90
handleErrorCaseFunction · 0.90
runCallbackFunction · 0.85
finishCheckInFunction · 0.85

Calls 5

getCurrentScopeFunction · 0.90
getClientFunction · 0.90
uuid4Function · 0.90
captureCheckInMethod · 0.80
warnMethod · 0.65

Tested by

no test coverage detected