-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add tests for attribute JSON marshalling #7268
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7268 +/- ##
=====================================
Coverage 82.9% 82.9%
=====================================
Files 265 265
Lines 24894 24894
=====================================
+ Hits 20639 20646 +7
+ Misses 3879 3873 -6
+ Partials 376 375 -1 🚀 New features to boost your workflow:
|
5570260 to
e5fff54
Compare
Co-authored-by: Flc゛ <[email protected]>
MrAlias
left a comment
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.
Thanks for the added tests, this is a good addition to the package.
The original comment inspiring this was about the unmarshlilng of this data. Do we need added checks for unmarshling, or is that just not a possible operation?
Co-authored-by: Tyler Yahn <[email protected]>
|
Currently, unmarshaling our attribute.Value type doesn't work properly. When I tried, it correctly unmarshaled the list and the key of each element, but the value was always invalid. I think we could implement UnmarshalJSON for the Value type to make that round-trip work properly, but it doesn't today. I figured for the purposes of unblocking #7175 it would be enough to test the MarshalJSON output. See opentelemetry-go/attribute/value.go Lines 262 to 270 in be1e57f
|
|
So if we add another hash field to the |
|
Ah, you can't unmarshal into a |
Forked from #7175 (comment)
This adds a test for JSON marshaling of attribute sets.