feat(aws-lambda): Add span streaming support to AWS Lambda integration#6498
Open
ericapisani wants to merge 6 commits into
Open
feat(aws-lambda): Add span streaming support to AWS Lambda integration#6498ericapisani wants to merge 6 commits into
ericapisani wants to merge 6 commits into
Conversation
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
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ 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.
Contributor
Codecov Results 📊✅ 88442 passed | ⏭️ 6022 skipped | Total: 94464 | Pass Rate: 93.63% | Execution Time: 299m 30s 📊 Comparison with Base Branch
All tests are passing successfully. ❌ Patch coverage is 22.22%. Project has 2492 uncovered lines. Files with missing lines (1)
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 |
…hich they're coming in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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