Add update_data to Span.#4666
Conversation
szokeasaurusrex
left a comment
There was a problem hiding this comment.
This API is a bit confusing, imo, as it is unclear what should happen if a user calls set_data with a dict as the first parameter, and something else as the second parameter.
I would prefer we instead introduce a separate function to enable setting data as a dict, rather than supporting two distinct signatures for set_data.
Although if others are okay with having set_data support both ways, we can go with it – just sharing my two cents here. In that case, though, I would define both APIs with @overload.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4666 +/- ##
==========================================
- Coverage 85.09% 85.07% -0.03%
==========================================
Files 156 156
Lines 15797 15801 +4
Branches 2671 2671
==========================================
Hits 13442 13442
- Misses 1578 1585 +7
+ Partials 777 774 -3
|
|
True @szokeasaurusrex i have now changed it to have a |
szokeasaurusrex
left a comment
There was a problem hiding this comment.
I think the Cursor bug bot might have found something. Besides that, looks good
This allows users to set multiple
span.dataattributes at once.In 3.x this then will become
set_attributes(plural).