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

Method captureEvent

packages/core/src/scope.ts:749–760  ·  view source on GitHub ↗

* Capture a Sentry event for this scope. * * @returns {string} The id of the captured event.

(event: Event, hint?: EventHint)

Source from the content-addressed store, hash-verified

747 * @returns {string} The id of the captured event.
748 */
749 public captureEvent(event: Event, hint?: EventHint): string {
750 const eventId = event.event_id || hint?.event_id || uuid4();
751
752 if (!this._client) {
753 DEBUG_BUILD && debug.warn('No client configured on scope - will not capture event!');
754 return eventId;
755 }
756
757 this._client.captureEvent(event, { ...hint, event_id: eventId }, this);
758
759 return eventId;
760 }
761
762 /**
763 * This will be called on every set call.

Callers 10

hint.test.tsFile · 0.45
scope.test.tsFile · 0.45
client.test.tsFile · 0.45
captureFeedbackFunction · 0.45
captureEventFunction · 0.45
_onSpanEndedMethod · 0.45
subject.jsFile · 0.45
subject.jsFile · 0.45

Calls 2

uuid4Function · 0.90
warnMethod · 0.65

Tested by

no test coverage detected