How to get the correct MeterProvider in extension tests #13818
Unanswered
bryce-anderson
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writing a custom extension and using the
AbstractHttpClientTest
to test it. This extension just automatically installs some filters that are compiled against the opentelemetry-api package (eg, not a part of the extension build and thus not using the agents shaded types). TheAbstractHttpClientTest.httpClientMetrics()
test always fails and it looks like it's because I'm always getting the noop MeterProvider. This appears to be because I'm getting the vanillaApplicationOpenTelmetry
fromGlobalOpenTelemetry.get()
which uses the defaultgetMeterProvider()
method that returns the noop provider.It looks like the agent itself has
ApplicationOpenTelemetry127
that addresses this which will be reflectively loaded if it's on the classpath, but it doesn't appear to be part of the agent testing package. Have I potentially misconfigured something that is causing this to not be available during testing?Beta Was this translation helpful? Give feedback.
All reactions