ref(node): Streamline Firebase instrumentation#21748
Conversation
Create Firebase spans via the `@sentry/core` `startSpan` API instead of the OTel tracer, and fold the integration's firestore/functions hooks (origin, op, captureException) directly into the instrumentation. Ref JS-2848 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4e752d2. Configure here.
| handled: false, | ||
| }, | ||
| }); | ||
| await flush(2000); |
There was a problem hiding this comment.
Flush runs before span ends
High Severity
On handler failure, captureException and await flush(2000) run inside the startSpan callback before the error is rethrown. startSpan only ends the function span after that rejection, so the flush can drain the queue while the span is still open and before span.end() enqueues the finished transaction. In short-lived Firebase Functions, telemetry from the ended span may never be sent.
Reviewed by Cursor Bugbot for commit 4e752d2. Configure here.
There was a problem hiding this comment.
valid. Technically it is a replacement of the errorHook, but now everything is inside the startSpan. To achieve this I think an interactive span should be used instead to achieve the same.
size-limit report 📦
|
JPeer264
left a comment
There was a problem hiding this comment.
Everything looks good, except the clankers objection. Once this is resolved I'll review again


Streamlines the firebase instrumentation:
@sentry/core.