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-lambda): Add span streaming support to AWS Lambda integration by ericapisani · Pull Request #6498 · getsentry/sentry-python

Conversation

@ericapisani

@ericapisani ericapisani commented Jun 3, 2026

Copy link
Copy Markdown
Member

feat(aws-lambda): Add span streaming support to AWS Lambda integration

When span streaming is enabled via the trace_lifecycle experiment, use
sentry_sdk.traces.start_span instead of start_transaction so the function
span is emitted as a span envelope item with OTel-compatible attributes
(cloud.provider, cloud.platform, faas., aws.lambda.).

Also adds CLOUD_PLATFORM.AWS_LAMBDA constant and updates the test server
helper to route span envelope items into a separate span_items list so
tests can assert on streamed spans independently of error envelopes.

Depends on getsentry/sentry-conventions#414 being
shipped first as it introduces a number of the conventions used here

Fixes PY-2307
Fixes #6005

Sorry, something went wrong.

Uh oh!

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

sentry[bot] reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@ericapisani
feat(aws-lambda): Add span streaming support to AWS Lambda integration
5bef11c
When span streaming is enabled via the trace_lifecycle experiment, use
sentry_sdk.traces.start_span instead of start_transaction so the function
span is emitted as a span envelope item with OTel-compatible attributes
(cloud.provider, cloud.platform, faas.*, aws.lambda.*).

Also adds CLOUD_PLATFORM.AWS_LAMBDA constant and updates the test server
helper to route span envelope items into a separate span_items list so
tests can assert on streamed spans independently of error envelopes.

Depends on getsentry/sentry-conventions#414 being
shipped first as it introduces a number of the conventions used here

Fixes PY-2307
Fixes #6005
@linear-code

linear-code Bot commented Jun 3, 2026

Copy link
Copy Markdown

PY-2307

All reactions

Sorry, something went wrong.

Uh oh!

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

@ericapisani

ericapisani commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

bugbot run
@sentry review

cursor[bot] reacted with thumbs up emoji sentry[bot] reacted with hooray emoji
All reactions
  • 👍 1 reaction
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

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

cursor[bot]
cursor Bot reviewed Jun 3, 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 5bef11c. Configure here.

Sorry, something went wrong.

Uh oh!

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

All reactions
@github-actions

github-actions Bot commented Jun 3, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 88442 passed | ⏭️ 6022 skipped | Total: 94464 | Pass Rate: 93.63% | Execution Time: 299m 30s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +16
Passed Tests 📈 +16
Failed Tests —
Skipped Tests —

All tests are passing successfully.

❌ Patch coverage is 22.22%. Project has 2492 uncovered lines.
❌ Project coverage is 89.31%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/aws_lambda.py 19.23% ⚠️ 21 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    89.38%    89.31%    -0.07%
==========================================
  Files          192       192         —
  Lines        23285     23308       +23
  Branches      8002      8012       +10
==========================================
+ Hits         20811     20816        +5
- Misses        2474      2492       +18
- Partials      1309      1309         —

Generated by Codecov Action

All reactions

Sorry, something went wrong.

Uh oh!

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

@ericapisani
Update tests to not filter for segment spans - we know the order in w…
590ec69
…hich they're coming in
@ericapisani
ericapisani marked this pull request as ready for review June 3, 2026 19:40
@ericapisani
ericapisani requested a review from a team as a code owner June 3, 2026 19:40
ericapisani added 2 commits June 4, 2026 08:38
@ericapisani
Filter for segment to avoid the flaky case where http.client spans ar…
1047bdb
…e sometimes created
@ericapisani
Add info about the size of the batch that was previously added on tag
976c97d
sentry-warden[bot]
sentry-warden Bot reviewed Jun 4, 2026
View reviewed changes
Comment thread sentry_sdk/integrations/aws_lambda.py Resolved

Uh oh!

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

@ericapisani
Address the encoding issue raised by warden
3d9451f
@ericapisani ericapisani mentioned this pull request Jun 4, 2026
feat(chalice): Add span streaming support to Chalice integration #6503
Merged
@ericapisani
lint
c744f3e
sentrivana
sentrivana approved these changes Jun 5, 2026
View reviewed changes

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Collaborator

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.

LGTM! But we need to wait for the conventions PR before merging 😴

Sorry, something went wrong.

Uh oh!

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

All reactions
@ericapisani

ericapisani commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

Just merged the conventions so merging this now 😄

All reactions

Sorry, something went wrong.

Uh oh!

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

@ericapisani
ericapisani merged commit a6fdebd into master Jun 10, 2026
144 checks passed

Uh oh!

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

@ericapisani
ericapisani deleted the py-2307-migrate-aws-lambda branch June 10, 2026 15:43
@ericapisani ericapisani added the skip-changelog label Jun 12, 2026
mgaligniana pushed a commit to mgaligniana/sentry-python that referenced this pull request Aug 9, 2026
@ericapisani @mgaligniana
feat(aws-lambda): Add span streaming support to AWS Lambda integration (
bf505df
getsentry#6498)

When span streaming is enabled via the trace_lifecycle experiment, use
sentry_sdk.traces.start_span instead of start_transaction so the
function
span is emitted as a span envelope item with OTel-compatible attributes
(cloud.provider, cloud.platform, faas.*, aws.lambda.*).

Also adds CLOUD_PLATFORM.AWS_LAMBDA constant and updates the test server
helper to route span envelope items into a separate span_items list so
tests can assert on streamed spans independently of error envelopes.

Depends on getsentry/sentry-conventions#414
being
shipped first as it introduces a number of the conventions used here

Fixes PY-2307
Fixes getsentry#6005
@sentry-junior sentry-junior Bot mentioned this pull request Nov 12, 2026
fix(aws-lambda): Remove messaging.batch.message_count from the Lambda span #8229
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@sentry-warden sentry-warden[bot] sentry-warden[bot] left review comments
@sentrivana sentrivana sentrivana approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

skip-changelog

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Migrate aws_lambda to span first

Uh oh!

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

2 participants

@ericapisani @sentrivana
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 01402503 — 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.