Providers do not check instrumentation scope attributes when returning cached loggers, tracers, or meters #3208
Labels
bug
Something isn't working
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Describe your environment
main branch at 6ed0651
Background
After working with the otel python api/sdk a bit and reviewing the 1.40.0 OTEL spec it seems that the c++ implementation of the GetTracer, GetLogger, and GetMeter may not be fully meeting the spec with respect to these methods returning distinct instances based on all parameters including the attributes. Reading the spec I'd expect that calling GetTracer with different attributes would return different tracers but that is not the case.
Steps to reproduce
The following test illustrates the issue.
What is the expected behavior?
Test passes
What is the actual behavior?
Test fails
Additional context
The current 1.40.0 OTEL specification has language that seems to imply any difference in parameters passed to get_logger, get_tracer, and get_meter must result in a distinct instance.
The
InstrumentationScope::equal
method doesn't account for attributesThe text was updated successfully, but these errors were encountered: