-
Notifications
You must be signed in to change notification settings - Fork 557
Add update_data
to Span
.
#4666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add update_data
to Span
.
#4666
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the Cursor bug bot might have found something. Besides that, looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks! (but pls see comment before merge)
This allows users to set multiple
span.data
attributes at once.In 3.x this then will become
set_attributes
(plural).