Add missing set value attribute shortcuts#8255
Add missing set value attribute shortcuts#8255trask wants to merge 3 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8255 +/- ##
============================================
- Coverage 90.32% 90.29% -0.03%
- Complexity 7651 7660 +9
============================================
Files 842 844 +2
Lines 23075 23075
Branches 2312 2311 -1
============================================
- Hits 20842 20836 -6
- Misses 1514 1521 +7
+ Partials 719 718 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I won't block it, but I think I remember we left these out intentionally, since it's not a common use-case, and one we don't want to encourage people outside of instrumentation authors from using? |
| /** | ||
| * Sets a {@link Value} attribute on the {@code LogRecord}. If the {@code LogRecord} previously | ||
| * contained a mapping for the key, the old value is replaced by the specified value. | ||
| * |
There was a problem hiding this comment.
add comment here and elsewhere
Instrumentations should assume that backends do not index individual properties of complex attributes, that querying or aggregating on such properties is inefficient and complicated, and that reporting complex attributes carries higher performance overhead.
The shortcut was added to AttributesBuilder:
opentelemetry-java/api/all/src/main/java/io/opentelemetry/api/common/AttributesBuilder.java
Lines 213 to 215 in 207c861
I probably just forgot to add them elsewhere.