Skip to content

Conversation

@JPeer264
Copy link
Member

Closes: #17861

This adds

Supported functions
  • onRequest
  • onCall
  • onDocumentCreated
  • onDocumentUpdated
  • onDocumentDeleted
  • onDocumentWritten
  • onDocumentCreatedWithAuthContext
  • onDocumentUpdatedWithAuthContext
  • onDocumentDeletedWithAuthContext
  • onDocumentWrittenWithAuthContext
  • onSchedule
  • onObjectFinalized
  • onObjectArchived
  • onObjectDeleted
  • onObjectMetadataUpdated

Bear in mind that the OTel attributes for FaaS are still in Development and could change or be removed over time (not sure if we should then even add them in here at this point in time).

@JPeer264 JPeer264 requested a review from andreiborza October 16, 2025 12:21
@JPeer264 JPeer264 force-pushed the jp/firebase-integration branch from 6c85adc to ea06541 Compare October 16, 2025 12:22
cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.63 kB - -
@sentry/browser - with treeshaking flags 23.11 kB - -
@sentry/browser (incl. Tracing) 40.97 kB - -
@sentry/browser (incl. Tracing, Profiling) 45.26 kB - -
@sentry/browser (incl. Tracing, Replay) 79.29 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.97 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 83.99 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 96.16 kB - -
@sentry/browser (incl. Feedback) 41.3 kB - -
@sentry/browser (incl. sendFeedback) 29.29 kB - -
@sentry/browser (incl. FeedbackAsync) 34.22 kB - -
@sentry/react 26.31 kB - -
@sentry/react (incl. Tracing) 42.97 kB - -
@sentry/vue 29.11 kB - -
@sentry/vue (incl. Tracing) 42.75 kB - -
@sentry/svelte 24.64 kB - -
CDN Bundle 26.9 kB - -
CDN Bundle (incl. Tracing) 41.62 kB - -
CDN Bundle (incl. Tracing, Replay) 77.87 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 83.35 kB - -
CDN Bundle - uncompressed 78.86 kB - -
CDN Bundle (incl. Tracing) - uncompressed 123.44 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 238.48 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 251.24 kB - -
@sentry/nextjs (client) 45.11 kB - -
@sentry/sveltekit (client) 41.4 kB - -
@sentry/node-core 50.75 kB +0.01% +1 B 🔺
@sentry/node 157.8 kB +0.56% +872 B 🔺
@sentry/node - without tracing 92.63 kB - -
@sentry/aws-serverless 106.35 kB - -

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,840 - 9,475 -7%
GET With Sentry 1,347 15% 1,349 -0%
GET With Sentry (error only) 6,214 70% 6,020 +3%
POST Baseline 1,198 - 1,189 +1%
POST With Sentry 541 45% 513 +5%
POST With Sentry (error only) 1,061 89% 1,072 -1%
MYSQL Baseline 3,355 - 3,320 +1%
MYSQL With Sentry 480 14% 431 +11%
MYSQL With Sentry (error only) 2,717 81% 2,688 +1%

View base workflow run

Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

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

@JPeer264 did you figure out what to do about flushing yet? Will that be part of this PR?

@JPeer264
Copy link
Member Author

A short update. After the first review I changed three major things:

  1. I trimmed down the types to a bare minimum. The functions were all the same and could be trimmed down to one small interface
  2. Unhandled Errors are now captured and send to Sentry
  3. I renamed the hooks to match the naming of an official OTel instrumentation package

@JPeer264 JPeer264 requested a review from andreiborza October 21, 2025 10:02
@JPeer264 JPeer264 force-pushed the jp/firebase-integration branch from a28cf51 to bc71a98 Compare October 21, 2025 12:01
Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

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

Great work!

cursor[bot]

This comment was marked as outdated.

@JPeer264 JPeer264 changed the title feat(firebase): instrument cloud functions for firebase v2 feat(firebase): Instrument cloud functions for firebase v2 Oct 22, 2025
Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

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

We need to bump the size limit of @sentry/node inside .size-limit.js then good to go!

@JPeer264 JPeer264 enabled auto-merge (squash) October 23, 2025 11:50
@JPeer264 JPeer264 merged commit 43b383c into develop Oct 23, 2025
373 of 379 checks passed
@JPeer264 JPeer264 deleted the jp/firebase-integration branch October 23, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Full, native support for Firebase Functions

2 participants