-
Notifications
You must be signed in to change notification settings - Fork 934
DeclarativeConfiguredOpenTelemetrySdk introduced #7191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeclarativeConfiguredOpenTelemetrySdk introduced #7191
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (43.75%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #7191 +/- ##
============================================
- Coverage 89.92% 89.56% -0.36%
- Complexity 6662 6682 +20
============================================
Files 750 752 +2
Lines 20126 20286 +160
Branches 1973 1983 +10
============================================
+ Hits 18098 18170 +72
- Misses 1434 1510 +76
- Partials 594 606 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey have you seen #7118? Its related to this, but starts by adding a single customizer for Wondering if you can talk about your use case for these programmatic customizers. Ideally, we wouldn't need them because declarative config would have properties for all the things you might want to configure. I understand that in reality, there will be differences in what you can do programmatically and what you can express in YAML, but I'm still curious at what those things are so we can try to bridge the gap. |
Heyy, no I didn't see it since there is no mentioning of the issue in the PR. I actually don't have a use case, this PR is just an attempt to solve the issue. However, to me, programmatic customizers should not mutate the file configuration model( |
Curious why you think programmatic customization is preferable to customizing the model? IMO, customizing the model is more elegant, as long as the user has the ability to see what changes are made to their specified configuration model (i.e. via logging) and has the ability to opt-out.
For now, but the goal is have all the model classes part of the public API. However, we first need the schema in opentelemetry-configuration to stabilize so we can stabilize our APIs without risk of breaking changes in the upstream schema. In terms of the scope of the customizers, we talked in the 3/27/25 java SIG and decided:
I think a good place to start is with the |
As I mentioned, from my perspective, the thing that needs customization is the SDK, not the file configuration so, in my opinion, it still doesn't make sense to mutate the model which represents the file configuration given by user. However, let's close this and see what's gonna happen as you said 🙂 |
Hi all! As promised in the issue, I'm creating this draft PR to give you an overview about the customizable declarative SDK configuration I have been working on, so we can discuss about the final solution.
I tried to provide all the capabilities that
AutoConfiguredOpenTelemetrySdkBuilderhas so far. However there are still some missing customization options as I mentioned below. The plan is to add them one by one in another PRs.SdkMeterProviderconfiguration:metricReaderCustomizersupport yet, it can be added by refactoringMeterProviderFactory.metricExporterCustomizersupport yet, it can be added by refactoringMeterProviderFactoryandMetricReaderFactory.SdkTracerProviderconfiguration:spanExporterCustomizer**support yet, it can be added by refactoringTracerProviderFactoryandSpanProcessorFactory.spanProcessorCustomizersupport yet, It can be added by refactoringTracerProviderFactory.spanSamplerCustomizersupport yet, it can be added by refactoringTracerProviderFactory.SdkLoggerProviderconfiguration:logRecordExporterCustomizersupport yet, it can be added by refactoringLoggerProviderFactoryandLogRecordProcessorFactory.logRecordProcessorCustomizersupport yet, it can be added by refactoringLoggerProviderFactoryandLogRecordProcessorFactory.