feat(span-streaming): Add more span properties#5421
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ 13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 7.28s All tests are passing successfully. ❌ Patch coverage is 48.28%. Project has 13630 uncovered lines. Files with missing lines (180)
Generated by Codecov Action |
Codecov Results 📊✅ 43 passed | Total: 43 | Pass Rate: 100% | Execution Time: 5.38s All tests are passing successfully. ❌ Patch coverage is 50.00%. Project has 14625 uncovered lines. Files with missing lines (181)
Generated by Codecov Action |
| return self.value | ||
|
|
||
|
|
||
| # Segment source, see |
There was a problem hiding this comment.
This source related stuff is all just copied from the old TransactionSource and will be used by integrations and DSC later.
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.
| # These are typically high cardinality and the server hates them | ||
| LOW_QUALITY_SEGMENT_SOURCES = [ | ||
| SegmentSource.URL, | ||
| ] |
There was a problem hiding this comment.
Unused constant LOW_QUALITY_SEGMENT_SOURCES is dead code
Low Severity
LOW_QUALITY_SEGMENT_SOURCES is defined but never used anywhere in the codebase. A similar constant LOW_QUALITY_TRANSACTION_SOURCES exists in tracing.py and is actively used. This appears to be scaffolding code that isn't yet integrated.
alexander-alderman-webb
left a comment
There was a problem hiding this comment.
LGTM!
but since we can't get around having some getters/setters
Out of curiosity, why is this the case?
If you take span attributes for instance: there's no nice property-based way to set a single attribute, which is functionality that we definitely need as public API. You could allow access to the whole For simple, single-value stuff like |


op,source,name,origin,status, feature flags,span_idname->_namesince it has a getter/setter nowIn general regarding this getter/setter business vs. property-based getting and setting: The idiomatic way would be to use properties (e.g.
span.name = "name"), but since we can't get around having some getters/setters (e.g.set_attribute,set_flag, etc.), it's probably better to go for consistency and have getters/setters everywhere, even if it's not idiomatic. Otherwise users would have to remember if the specific thing they want to set is a property or has a setter.The above is about stuff people might want to set, so public API. For internal stuff that no one should be setting by hand (e.g.
span_id), we can still go with properties where it makes sense.Chipping away at #5317.