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

Function captureMessage

packages/core/src/exports.ts:42–48  ·  view source on GitHub ↗
(message: string, captureContext?: CaptureContext | SeverityLevel)

Source from the content-addressed store, hash-verified

40 * @returns the id of the captured message.
41 */
42export function captureMessage(message: string, captureContext?: CaptureContext | SeverityLevel): string {
43 // This is necessary to provide explicit scopes upgrade, without changing the original
44 // arity of the `captureMessage(message, level)` method.
45 const level = typeof captureContext === 'string' ? captureContext : undefined;
46 const hint = typeof captureContext !== 'string' ? { captureContext } : undefined;
47 return getCurrentScope().captureMessage(message, level, hint);
48}
49
50/**
51 * Captures a manually created event and sends it to Sentry.

Callers

nothing calls this directly

Calls 2

getCurrentScopeFunction · 0.90
captureMessageMethod · 0.80

Tested by

no test coverage detected