Description
#1421 allowed pre-creation of AttributeSet
for scenarios requiring high performance. This also moved AttributeSet
to the opentelemetry api. This has an undesired/unintended side effect: The entire cost of creating AttributeSet
is now paid in the API itself (like sort/hash/de-duplication), making it impossible to do optimizations in the SDK, as the perf hit is already paid in the API itself.
This violates the core OTel requirement that the overhead of using the OTel API should be zero/close-to-zero, without an SDK configured. Because right now, even without an SDK configured, the OTel API does the AttributeSet
creation which is a far from the zero/close-to-zero overhead. i.e the NoOp implementation is broken.
This is similar to #1189, but this is much more serious due to the perf hit.
Need to find a way to achieve the intended perf gains, but yet move off entire AttributeSet
creation to the actual SDK. Will discuss some ideas in the next community meeting.
cc : @lalitb @KallDrexx