Open benjamin-confino opened 1 week ago
A few questions:
To add to the list above:
dev
directory and for publishing to maven central)There are a few different scenarios for OTel objects, aren't there? You can have one per application, or one for the whole server. Similarly you could be trying to acquire the OTel object within the context of an application or outside of it. Can you list what you expect to happen in each case? You should probably have a test for each case.
One oTel per App | One oTel per Server | |
---|---|---|
Called within app contex | Return the app oTel object | Return the server oTel object |
Called outside app contex | Will return a NoOp object (currently an NPE but I'm fixing this as part of an unrelated issue) | Return the server oTel object |
Are there restrictions on when a user feature can obtain the OTel object? Could there be cases where they try to acquire it before mpTelemetry has registered the start of the application?
This would be legitimate if running in server scoped mode, and as per the standard OTel paradigm it returns a no-op rather than fails or imposes restrictions if called when there is no working OTel object available.
This is linked with #32050
z/OS Connect have requested a way to get hold of
OpenTelemetry
objects. We have existing code that could provide this (OpenTelemetryAccessor
) but it is not exposed to user features, and it has additional functionality that should not be exposed to user features. To resolve this issue a stripped down version ofOpenTelemetryAccessor
andOpenTelemetryInfo
should be packaged as an SPI.Checklist
dispose()
method and package it in the same SPI jar.