GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(aws-serverless): Add HTTP request and response attributes to function.aws spans by sentry-junior[bot] · Pull Request #26226 · getsentry/sentry-javascript

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Why: When a Lambda runs behind a Function URL, API Gateway, or ALB, its function.aws span only had url.full to say which request it handled. So two invocations of the same function (e.g. / and the browser's /favicon.ico fetch in #25813) looked like a duplicated trace. These spans now get the request attributes http.server spans have: http.request.method, url.path, url.query, url.scheme, server.address/server.port, client.address (gated by dataCollection.userInfo, like http.server), user_agent.original, network.protocol.*, faas.trigger: http, and http.response.status_code from the handler result. None of these are deprecated in @sentry/conventions, and no existing attribute is removed or changed.

http.route is only set from route templates: the HTTP API routeKey (method prefix stripped) and the REST API resource. Function URLs and $default routes get no route. HTTP API payload format 1.0 also gets none, because it puts the raw path in resource for $default. The span name stays the function name so it stays low cardinality.

How to review: Start with httpEventAttributes.ts. The handler change only passes the event through so the status code can be set when the span ends.

Unsure about: The status code only comes from a non-streaming result's statusCode. For payload 2.0 a 200 is also inferred when the handler returns a value without one, since that's what AWS does. The span status isn't derived from the status code, because that would turn spans that are ok today into errors. The new e2e test hasn't been run locally.

Refs #25813

via Francesco Gringl-Novy.

--

View Session [Sentry]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sentry-junior @mydea
feat(aws-serverless): Add HTTP request and response attributes to fun…
e060b6d
…ction.aws spans

Invocations triggered by a Lambda Function URL, API Gateway or ALB only
carried url.full, so different requests to the same function were hard
to tell apart. Add the http.server request attributes (method, path,
query, scheme, server address/port, client address, user agent, protocol)
plus faas.trigger, http.route from route templates only, and
http.response.status_code from the handler result.

Refs JS-4029

Co-Authored-By: Francesco Gringl-Novy <[email protected]>
@sentry-junior sentry-junior Bot mentioned this pull request Nov 10, 2026
feat(aws-serverless): Ignore static asset and preflight invocations by default #26228
Merged
@sentry-junior
sentry-junior Bot added this pull request to stack #26229 November 10, 2026 08:47
@github-actions

github-actions Bot commented Nov 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 5956910 (PR test merge using develop at 6ee26d6)

Against: 6ee26d6 (develop) · base run #65665

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 29.98 kB - -
@sentry/browser - with treeshaking flags 28.13 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.02 kB - -
@sentry/browser (incl. Tracing) 52.36 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.36 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.33 kB - -
@sentry/browser (incl. Tracing, Replay) 92.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.41 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.49 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.48 kB - -
@sentry/browser (incl. Feedback) 47.57 kB - -
@sentry/browser (incl. sendFeedback) 35.07 kB - -
@sentry/browser (incl. FeedbackAsync) 40.18 kB - -
@sentry/browser (incl. Metrics) 31.54 kB - -
@sentry/browser (incl. Logs) 31.83 kB - -
@sentry/browser (incl. Metrics & Logs) 32.52 kB - -
@sentry/react 31.84 kB - -
@sentry/react (incl. Tracing) 54.8 kB - -
@sentry/vue 38.39 kB - -
@sentry/vue (incl. Tracing) 55.38 kB - -
@sentry/svelte 30 kB - -
@sentry/remix (Remix 3 client bundle) 57.97 kB - -
CDN Bundle 31.77 kB - -
CDN Bundle (incl. Tracing) 52.94 kB - -
CDN Bundle (incl. Logs, Metrics) 34.58 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.45 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.05 kB - -
CDN Bundle (incl. Tracing, Replay) 91.22 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.77 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.34 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.93 kB - -
CDN Bundle - uncompressed 92.89 kB - -
CDN Bundle (incl. Tracing) - uncompressed 156.15 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.42 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.92 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.31 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 278.17 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.93 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.87 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 299.63 kB - -
@sentry/nextjs (client) 57.79 kB - -
@sentry/sveltekit (client) 52.88 kB - -
@sentry/core/server 44.51 kB - -
@sentry/core/browser 14.02 kB - -
@sentry/node 157.8 kB +0.02% +16 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.31 kB - -
@sentry/node - without tracing 97.23 kB +0.02% +18 B 🔺
@sentry/node - without channel injection 138.12 kB +0.02% +18 B 🔺
@sentry/aws-serverless 106.08 kB +0.03% +24 B 🔺
@sentry/cloudflare (withSentry) - minified 204.45 kB - -
@sentry/cloudflare (withSentry) 508.11 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 226.13 kB - -

View base workflow run

sentry-junior[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sentry-junior sentry-junior Bot assigned mydea Nov 10, 2026
mydea
mydea reviewed Nov 10, 2026
View reviewed changes
Comment thread packages/aws-serverless/src/httpEventAttributes.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sentry-junior
ref(aws-serverless): Build HTTP event attributes directly
fbc6fee
@mydea
mydea marked this pull request as ready for review November 10, 2026 10:54
@mydea
mydea requested review from a team, JPeer264 and stephanie-anderson November 10, 2026 10:54
@mydea
mydea requested review from a team as code owners November 10, 2026 10:54
@mydea
mydea requested review from andreiborza, chargome, logaretm, msonnb and nicohrubec and removed request for a team November 10, 2026 10:54
cursor[bot]
cursor Bot reviewed Nov 10, 2026
View reviewed changes

@cursor cursor Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/aws-serverless/src/httpEventAttributes.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/aws-serverless/test/httpEventAttributes.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sentry-junior
fix(aws-serverless): Handle null headers in HTTP event attributes
14fae58
API Gateway sends headers: null for requests without headers, which made
getClientIPAddress throw before the handler ran. Also use conventions
constants in the unit tests.
@github-actions

github-actions Bot commented Nov 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 4 not successful, 53 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nextjs-16-cacheComponents (cloudflare) Test (optional) Failing after 10m Details
❌ CI: Optional E2E Tests / E2E node-eve (latest) Test (optional) Failing after 53s Details
❌ CI: Optional E2E Tests / E2E node-eve Test (optional) Failing after 2m Details
❌ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Failing after 2m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 42s Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 44s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-think Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 (tracer provider) Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-mastra Test (optional) Successful in 50s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions Test (optional) Successful in 30s Details
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E node-mastra Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 39s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 49s Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (latest) Test (optional) Successful in 52s Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 47s Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 30s Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable Test (optional) Successful in 49s Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 44s Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E nextjs-orpc Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable Test (optional) Successful in 47s Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 31s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (tunnel-dev) Test (optional) Successful in 49s Details
sentry-junior[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

msonnb
msonnb reviewed Nov 11, 2026
View reviewed changes
Comment thread packages/aws-serverless/src/httpEventAttributes.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/aws-serverless/src/httpEventAttributes.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

sentry-junior Bot added 2 commits November 11, 2026 11:08
@sentry-junior
Merge remote-tracking branch 'origin/develop' into feat/aws-serverles…
e03527c
…s-http-event-attributes
@sentry-junior
ref(aws-serverless): Build url.full with the HTTP event attributes
40097a3
Reuses the payload-format aware path and query extraction for url.full and
drops the separate extractFullUrl. client.address now prefers a forwarded
address over sourceIp, like http.server spans.
cursor[bot]
cursor Bot reviewed Nov 11, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

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 3 potential issues.

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 40097a3. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sentry-junior[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
Comment thread packages/aws-serverless/src/httpEventAttributes.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/aws-serverless/src/httpEventAttributes.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread dev-packages/e2e-tests/test-applications/aws-serverless/tests/npm.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sentry-junior
fix(aws-serverless): Read ALB multi-value headers and string status c…
6eeb8ce
…odes
msonnb
msonnb reviewed Nov 11, 2026
View reviewed changes
Comment thread packages/aws-serverless/test/requestSpanOptions.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sentry-junior
test(aws-serverless): Fold url.full port tests into HTTP event attrib…
61a552f
…ute tests
msonnb
msonnb approved these changes Nov 11, 2026
View reviewed changes
@mydea
mydea merged commit edae47f into develop Nov 11, 2026
470 of 479 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mydea
mydea deleted the feat/aws-serverless-http-event-attributes branch November 11, 2026 14:19
mydea added a commit that referenced this pull request Nov 11, 2026
@sentry-junior @mydea
feat(aws-serverless): Ignore static asset and preflight invocations b…
86c5981
…y default (#26228)

**Why:** When a browser opens a Lambda Function URL, it also fetches
`/favicon.ico`. That shows up as a second `function.aws` trace that
looks like a duplicate (#25813). `init()` now adds default `ignoreSpans`
filters for the invocations `http.server` spans skip by default: GET
requests for static assets and metadata files (the same list as
`isStaticAssetRequest` in core), and OPTIONS/HEAD requests. Filters
users pass in are kept.

**How to review:** This is stacked on #26226 because the filters match
on the `http.request.method` and `url.path` attributes added there.
Retarget to `develop` once that one merges.

**Unsure about:** Static asset filtering can be turned off with
`ignoreStaticAssets: false`, the same as `http.server`. OPTIONS/HEAD are
always skipped. The regex duplicates core's `isStaticAssetRequest`
because `ignoreSpans` only takes patterns, not functions.

Refs #25813

<!-- junior-request-attribution:start -->
via **Francesco Gringl-Novy**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AD0CA8FXFXAS%3A1794297679.791099 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/slack%3AD0CA8FXFXAS%3A1794297679.791099)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0CA8FXFXAS%3A1794297679.791099/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Francesco Gringl-Novy <[email protected]>
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Nov 16, 2026
publish: getsentry/[email protected] getsentry/publish#10451
Closed
51 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mydea mydea mydea left review comments
@cursor cursor[bot] cursor[bot] left review comments
@msonnb msonnb msonnb approved these changes
@stephanie-anderson stephanie-anderson Awaiting requested review from stephanie-anderson stephanie-anderson was automatically assigned from getsentry/team-javascript-sdks
@JPeer264 JPeer264 Awaiting requested review from JPeer264 JPeer264 was automatically assigned from getsentry/team-javascript-sdks
@andreiborza andreiborza Awaiting requested review from andreiborza andreiborza was automatically assigned from getsentry/team-javascript-sdks-server
@logaretm logaretm Awaiting requested review from logaretm logaretm was automatically assigned from getsentry/team-javascript-sdks-browser
@chargome chargome Awaiting requested review from chargome chargome was automatically assigned from getsentry/team-javascript-sdks-framework
@nicohrubec nicohrubec Awaiting requested review from nicohrubec nicohrubec was automatically assigned from getsentry/team-javascript-sdks-framework

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@mydea mydea

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mydea @msonnb
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.