Re-order the Resource merge in getTracerProviderInitializationOptions' so that built-in resource attributes are lowest priority rather than highest.
Enables overriding built-in resources with OTEL_RESOURCE_ATTRIBUTES environment variable.
Enables overriding OTEL_RESOURCE_ATTRIBUTES and built-ins with the user resource provided as an argument to getTracerProviderInitializationOptions'.
Add unit tests and documentation to establish the left-biased nature of Attributes and Resource: when two attribute keys conflict, the value of the leftmost element is used.
Fix bug in unsafeMergeAttributesIgnoringLimits where attribute count can get out of sync with actual size of the HashMap. Instead of adding the sizes of the inputs, simply take the size of the resulting HashMap. This is the approach used in the neighboring function unsafeAttributesFromListIgnoringLimits. Taking the size is $O(n)$ for HashMap, so may want to use Data.Map instead.
Fixes #111
getTracerProviderInitializationOptions'
so that built-in resource attributes are lowest priority rather than highest.getTracerProviderInitializationOptions'
.Attributes
andResource
: when two attribute keys conflict, the value of the leftmost element is used.unsafeMergeAttributesIgnoringLimits
where attribute count can get out of sync with actual size of the HashMap. Instead of adding the sizes of the inputs, simply take the size of the resulting HashMap. This is the approach used in the neighboring functionunsafeAttributesFromListIgnoringLimits
. Taking the size is $O(n)$ for HashMap, so may want to use Data.Map instead.