Skip to content

feat(node)!: Use function.gcp span op for Firebase functions - #22659

Closed
msonnb wants to merge 3 commits into
developfrom
ms/js-3105-firebase-functions-gcp-op
Closed

feat(node)!: Use function.gcp span op for Firebase functions#22659
msonnb wants to merge 3 commits into
developfrom
ms/js-3105-firebase-functions-gcp-op

Conversation

@msonnb

@msonnb msonnb commented Jul 27, 2026

Copy link
Copy Markdown
Member

Replace http.request with function.gcp for Firebase function triggers. The Firebase Functions wrapper instruments every v2 trigger type. A non-HTTP trigger such as onDocumentCreated was therefore previously reported as an HTTP operation.

Part of #22446

Note: MIGRATION.md will be one combined follow up PR

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

JS-3105

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.85 kB - -
@sentry/browser - with treeshaking flags 28.06 kB - -
@sentry/browser (incl. Tracing) 47.42 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.43 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.16 kB - -
@sentry/browser (incl. Tracing, Replay) 86.75 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.16 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.49 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 104.12 kB - -
@sentry/browser (incl. Feedback) 47.17 kB - -
@sentry/browser (incl. sendFeedback) 34.69 kB - -
@sentry/browser (incl. FeedbackAsync) 39.78 kB - -
@sentry/browser (incl. Metrics) 30.92 kB - -
@sentry/browser (incl. Logs) 31.15 kB - -
@sentry/browser (incl. Metrics & Logs) 31.83 kB - -
@sentry/react 31.64 kB - -
@sentry/react (incl. Tracing) 49.64 kB - -
@sentry/vue 34.77 kB - -
@sentry/vue (incl. Tracing) 49.38 kB - -
@sentry/svelte 29.88 kB - -
CDN Bundle 31.89 kB - -
CDN Bundle (incl. Tracing) 47.77 kB - -
CDN Bundle (incl. Logs, Metrics) 33.44 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.15 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.8 kB - -
CDN Bundle (incl. Tracing, Replay) 85.41 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.69 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.48 kB - -
CDN Bundle - uncompressed 95.14 kB - -
CDN Bundle (incl. Tracing) - uncompressed 143.28 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.85 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.26 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.61 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.54 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.5 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.24 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.2 kB - -
@sentry/nextjs (client) 52.23 kB - -
@sentry/sveltekit (client) 47.84 kB - -
@sentry/core/server 79.73 kB - -
@sentry/core/browser 51.61 kB - -
@sentry/node 125.41 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 85.76 kB - -
@sentry/aws-serverless 93.78 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 196.62 kB - -
@sentry/cloudflare (withSentry) 483.75 kB - -

View base workflow run

@msonnb
msonnb force-pushed the ms/js-3105-firebase-functions-gcp-op branch 3 times, most recently from 334db59 to e1785e3 Compare July 27, 2026 13:49
@msonnb
msonnb marked this pull request as ready for review July 27, 2026 15:06
@msonnb
msonnb requested a review from a team as a code owner July 27, 2026 15:06
@msonnb
msonnb requested review from s1gr1d and stephanie-anderson and removed request for a team July 27, 2026 15:06
'sentry.source': 'route',
},
op: 'http.request',
op: 'function.gcp',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete op assertions in tests

Medium Severity

This feat changes the Firebase function span op to function.gcp, including for non-HTTP triggers like onDocumentCreated, but the Firestore transaction assertions still use expect.any(String) for sentry.op and op. Those are the payloads that previously wrongly reported http.request, so the new behavior is not thoroughly asserted. Flagged because the review rules require feat coverage to assert newly added payload data thoroughly and to avoid overly relaxed assertions.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit e1785e3. Configure here.

@msonnb
msonnb marked this pull request as draft July 27, 2026 15:10
@msonnb
msonnb force-pushed the ms/js-3105-firebase-functions-gcp-op branch from e1785e3 to 83e7945 Compare July 28, 2026 10:15
@msonnb
msonnb marked this pull request as ready for review July 28, 2026 10:55

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2c8a0b1. Configure here.

return startSpanManual(
{
name: `firebase.function.${triggerType}`,
op: 'http.request',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong Firebase path updated

High Severity

The production change sets function.gcp only on the unused OTEL Firebase patch, while the public default firebaseIntegration (orchestrion) still opens spans with function.firebase. The e2e expectations for auto.firebase.orchestrion.functions were updated to function.gcp, so the intended migration does not land on the path users and those tests actually exercise.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2c8a0b1. Configure here.

'sentry.source': 'route',
},
op: 'http.request',
op: 'function.gcp',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feat lacks runnable coverage

Medium Severity

This feat PR only updates test.fixme e2e cases and does not add a runnable unit, integration, or e2e test that exercises the new function.gcp op on the changed instrumentation. Per the project PR review guidelines, feat PRs need at least one integration or e2e test covering the new behavior.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 2c8a0b1. Configure here.

@msonnb msonnb closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant