* Capture a Sentry event for this scope. * * @returns {string} The id of the captured event.
(event: Event, hint?: EventHint)
| 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. |
no test coverage detected