feat(chalice): Add span streaming support to Chalice integration#6503
feat(chalice): Add span streaming support to Chalice integration#6503ericapisani wants to merge 3 commits into
Conversation
Add span streaming support behind the trace_lifecycle=stream experiment flag. When enabled, start a segment span with Lambda/FaaS attributes for both HTTP view functions and event source handlers instead of setting a transaction name on the scope. Also adds aws_lambda to CLOUD_PLATFORM constants. Fixes PY-2312 Fixes #6010
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 208cf35. Configure here.
| invoked_arn = aws_context.invoked_function_arn | ||
| split_invoked_arn = invoked_arn.split(":") | ||
| aws_region = split_invoked_arn[3] if len(split_invoked_arn) > 3 else "unknown" |
There was a problem hiding this comment.
Although AWS sets this value and it's unlikely to be malformed, these extra guards were added to ensure that if it were, we don't crash the user's application
Codecov Results 📊✅ 88454 passed | ⏭️ 6022 skipped | Total: 94476 | Pass Rate: 93.63% | Execution Time: 293m 26s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 98.48%. Project has 2481 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 89.38% 89.37% -0.01%
==========================================
Files 192 192 —
Lines 23285 23333 +48
Branches 8002 8012 +10
==========================================
+ Hits 20811 20852 +41
- Misses 2474 2481 +7
- Partials 1309 1310 +1Generated by Codecov Action |

Add span streaming support behind the trace_lifecycle=stream experiment flag.
When enabled, start a segment span with Lambda/FaaS attributes for both
HTTP view functions and event source handlers instead of setting a
transaction name on the scope.
Also adds aws_lambda to CLOUD_PLATFORM constants.
Contains some duplication with #6498 since it's an AWS lambda framework.
Fixes PY-2312
Fixes #6010