feat(cloud_resource_context): Support span streaming#6550
feat(cloud_resource_context): Support span streaming#6550alexander-alderman-webb wants to merge 1 commit into
Conversation
Codecov Results 📊✅ 88950 passed | ⏭️ 6013 skipped | Total: 94963 | Pass Rate: 93.67% | Execution Time: 301m 12s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2374 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 89.84% 89.87% +0.03%
==========================================
Files 192 192 —
Lines 23430 23433 +3
Branches 8050 8052 +2
==========================================
+ Hits 21049 21059 +10
- Misses 2381 2374 -7
- Partials 1333 1329 -4Generated by Codecov Action |
| if context != {}: | ||
| set_context(CONTEXT_TYPE, context) | ||
| for k, v in context.items(): | ||
| sentry_sdk.get_isolation_scope().set_attribute(k, v) |
There was a problem hiding this comment.
This will set the attributes on all spans. Given that they're not in the common attrs list, they should probably be set on the segment of the current span instead?
There was a problem hiding this comment.
Yes, the attributes should be on the segment span.
Now I look at this, I'm not sure how that would work because the context is set in setup_once().
I guess we would need some mechanism to set attributes on a scope that are then only applied on the segment span.
Alternatively, we consider not migrating the integration to span first.
There was a problem hiding this comment.
Right, missed that we're in setup_once here.
I would leave this integration out for now. I believe it'd make sense for this to live in the aws/gcp integrations eventually, but as is, I'd not migrate. Errors will still get the context and that's probably where it's most useful.
Description
Set data currently set on context as attributes on the isolation scope.
All attributes are in
sentry-conventions, except forhost.idandhost.type.Conventions PRs for these are approved:
host.idattribute sentry-conventions#416host.typeattribute sentry-conventions#417Tests only check integration internals, so no tests are required to maintain the same test coverage as before.
Issues
Closes #6012
Reminders
uv run ruff.feat:,fix:,ref:,meta:)