feat: always return ExtendedOpenTelemetry when incubator is available#7991
feat: always return ExtendedOpenTelemetry when incubator is available#7991jack-berg merged 6 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7991 +/- ##
============================================
- Coverage 90.14% 90.13% -0.01%
- Complexity 7476 7481 +5
============================================
Files 834 836 +2
Lines 22540 22562 +22
Branches 2236 2237 +1
============================================
+ Hits 20319 20337 +18
- Misses 1516 1520 +4
Partials 705 705 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Unused and a duplicate of ConfigProvider#noop()
There was a problem hiding this comment.
Called from https://github.com/zeitlinger/opentelemetry-java/blob/0db77eb839b0af1e7f32b0f7ced29e60edcce005/sdk/all/src/main/java/io/opentelemetry/sdk/IncubatingUtil.java#L26 to get an instance for ExtendedOpenTelemetrySdk.
I tried to make it return SdkConfigProvider - but then a design test failed.
There was a problem hiding this comment.
Called from https://github.com/zeitlinger/opentelemetry-java/blob/0db77eb839b0af1e7f32b0f7ced29e60edcce005/sdk/all/src/main/java/io/opentelemetry/sdk/IncubatingUtil.java#L26 to get an instance for ExtendedOpenTelemetrySdk.
I tried to make it return SdkConfigProvider - but then a design test failed.
| LogLimits.builder() | ||
| .setMaxAttributeValueLength(1) | ||
| .setMaxNumberOfAttributes(2) | ||
| OpenTelemetrySdk expectedSdk = |
There was a problem hiding this comment.
This change isn't strictly necessary is it since the test code could still call ExtendedOpenTelemetrySdk.create(..)? Not suggesting reverting - just trying to confirm my understanding.
|
IIUC, the benefit for this PR for callers is that now whenever |
Yes that has benefits
|
|
I think we can go even further to align I think long term, we end up with a |
Move SdkConfigProvider, ExtendedOpenTelemetrySdk to opentelemetry-sdk
sounds complicated maybe we can have |
Something like this: (ignore the cringy names) Another way we could go is we could define an SPI responsible for doing the YAML/json to POJO mapping we rely on jackson for. Then what class or method is responsible for parsing YAML/json could resolve the SPI. We provide a default implementation for jackson but allow the user to provide their own SPI implementation. |
this is the behavior we have for other extended classes and a first step towards #7961