Skip to content

feat(server-utils): Emit low cardinality function.gcp span names for firebase functions - #24069

Open
Lms24 wants to merge 1 commit into
lms/feat-gcp-faas-span-namesfrom
lms/feat-server-utils-firebase-span-names
Open

feat(server-utils): Emit low cardinality function.gcp span names for firebase functions#24069
Lms24 wants to merge 1 commit into
lms/feat-gcp-faas-span-namesfrom
lms/feat-server-utils-firebase-span-names

Conversation

@Lms24

@Lms24 Lms24 commented Sep 4, 2026

Copy link
Copy Markdown
Member

Adjusts function.gcp spans for firebase functions:

  • when span streaming is enabled, span names will be the function name (which we can read from env vars) or a string fallback
  • when disabled, we keep the current names.
  • added new gcp.function.context.type attributes to ensure seamless static->streaming migrations for span decriptions.

@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 1 potential issue.

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 8ca1bf7. Configure here.

Comment thread packages/server-utils/src/integrations/firebase/functions.ts
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 28.69 kB - -
@sentry/browser - with treeshaking flags 26.99 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.89 kB - -
@sentry/browser (incl. Tracing) 49.07 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 49.07 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.98 kB - -
@sentry/browser (incl. Tracing, Replay) 88.62 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.85 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 93.3 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 106.24 kB - -
@sentry/browser (incl. Feedback) 46.17 kB - -
@sentry/browser (incl. sendFeedback) 33.75 kB - -
@sentry/browser (incl. FeedbackAsync) 38.85 kB - -
@sentry/browser (incl. Metrics) 29.66 kB - -
@sentry/browser (incl. Logs) 29.94 kB - -
@sentry/browser (incl. Metrics & Logs) 30.59 kB - -
@sentry/react 30.45 kB - -
@sentry/react (incl. Tracing) 51.28 kB - -
@sentry/vue 35.91 kB - -
@sentry/vue (incl. Tracing) 51.34 kB - -
@sentry/svelte 28.71 kB - -
CDN Bundle 30.43 kB - -
CDN Bundle (incl. Tracing) 49.6 kB - -
CDN Bundle (incl. Logs, Metrics) 32.66 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 51.53 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.31 kB - -
CDN Bundle (incl. Tracing, Replay) 87.15 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.02 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 93.08 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.03 kB - -
CDN Bundle - uncompressed 90.13 kB - -
CDN Bundle (incl. Tracing) - uncompressed 147.81 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.52 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 153.59 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.82 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.44 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.15 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 286.9 kB - -
@sentry/nextjs (client) 53.89 kB - -
@sentry/sveltekit (client) 49.51 kB - -
@sentry/core/server 40.96 kB - -
@sentry/core/browser 13.53 kB - -
@sentry/node 124.8 kB +0.05% +59 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.51 kB - -
@sentry/node - without tracing 88.5 kB +0.03% +23 B 🔺
@sentry/node - without channel injection 104.11 kB +0.05% +42 B 🔺
@sentry/aws-serverless 96.87 kB +0.03% +23 B 🔺
@sentry/cloudflare (withSentry) - minified 201.56 kB - -
@sentry/cloudflare (withSentry) 501.37 kB - -

View base workflow run

@Lms24 Lms24 self-assigned this Sep 4, 2026
@Lms24
Lms24 marked this pull request as ready for review September 4, 2026 09:41
@Lms24
Lms24 requested a review from a team as a code owner September 4, 2026 09:41
@Lms24
Lms24 requested review from andreiborza, msonnb and stephanie-anderson and removed request for a team and stephanie-anderson September 4, 2026 09:41
@Lms24
Lms24 force-pushed the lms/feat-server-utils-firebase-span-names branch from 8ca1bf7 to 6994af6 Compare September 4, 2026 11:11
…r firebase functions

Firebase function spans were named `firebase.function.<triggerType>`, which does not follow the
FaaS span name convention. With span streaming enabled they are now named after the function,
falling back to `Serverless function execution` when neither `FUNCTION_TARGET` nor `K_SERVICE`
resolves. Static mode keeps the previous name.

`faas.name` no longer falls back to the literal string `unknown`, so that an unresolvable name
produces the static fallback rather than a span named `unknown`. The former span name is kept on
`gcp.function.context.type` so the span description can still be derived from it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 force-pushed the lms/feat-server-utils-firebase-span-names branch from 6994af6 to 086aa7d Compare September 4, 2026 12:11
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.

2 participants