Skip to content

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

Merged
Lms24 merged 1 commit into
lms/feat-gcp-faas-span-namesfrom
lms/feat-server-utils-firebase-span-names
Sep 8, 2026
Merged

feat(server-utils): Emit low cardinality function.gcp span names for firebase functions#24069
Lms24 merged 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 📦

Path Size % Change Change
@sentry/browser 28.8 kB added added
@sentry/browser - with treeshaking flags 27.11 kB added added
@sentry/browser - with treeshaking flags tracing without tracing 27 kB added added
@sentry/browser (incl. Tracing) 49.22 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 49.22 kB added added
@sentry/browser (incl. Tracing, Profiling) 52.12 kB added added
@sentry/browser (incl. Tracing, Replay) 88.76 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.95 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 93.44 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 106.37 kB added added
@sentry/browser (incl. Feedback) 46.3 kB added added
@sentry/browser (incl. sendFeedback) 33.86 kB added added
@sentry/browser (incl. FeedbackAsync) 38.97 kB added added
@sentry/browser (incl. Metrics) 29.82 kB added added
@sentry/browser (incl. Logs) 30.09 kB added added
@sentry/browser (incl. Metrics & Logs) 30.75 kB added added
@sentry/react 30.55 kB added added
@sentry/react (incl. Tracing) 51.56 kB added added
@sentry/vue 36.05 kB added added
@sentry/vue (incl. Tracing) 51.48 kB added added
@sentry/svelte 28.83 kB added added
CDN Bundle 30.55 kB added added
CDN Bundle (incl. Tracing) 49.74 kB added added
CDN Bundle (incl. Logs, Metrics) 32.82 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 51.7 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 73.48 kB added added
CDN Bundle (incl. Tracing, Replay) 87.29 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.18 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 93.22 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.21 kB added added
CDN Bundle - uncompressed 90.46 kB added added
CDN Bundle (incl. Tracing) - uncompressed 148.17 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.03 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.14 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.29 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.76 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.71 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.46 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.4 kB added added
@sentry/nextjs (client) 54 kB added added
@sentry/sveltekit (client) 49.65 kB added added
@sentry/core/server 36.99 kB added added
@sentry/core/browser 13.55 kB added added
@sentry/node 127.86 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.61 kB added added
@sentry/node - without tracing 88.73 kB added added
@sentry/node - without channel injection 107.11 kB added added
@sentry/aws-serverless 97.12 kB added added
@sentry/cloudflare (withSentry) - minified 201.98 kB added added
@sentry/cloudflare (withSentry) 502.68 kB added added

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
@Lms24
Lms24 force-pushed the lms/feat-server-utils-firebase-span-names branch from 6994af6 to 086aa7d Compare September 4, 2026 12: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 086aa7d to 01beebe Compare September 8, 2026 14:23
@Lms24
Lms24 merged commit 960385c into develop Sep 8, 2026
233 of 264 checks passed
@Lms24
Lms24 deleted the lms/feat-server-utils-firebase-span-names branch September 8, 2026 14:44
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