Skip to content

Conversation

@zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Feb 18, 2025

Relates open-telemetry/opentelemetry-specification#4416

Adds a hook for distributions to customize the parsed configuration.

@zeitlinger zeitlinger requested a review from a team as a code owner February 18, 2025 12:48
@codecov
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.97%. Comparing base (490173b) to head (76b3607).
Report is 5 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@ ## main #7118 +/- ## ============================================ + Coverage 89.93% 89.97% +0.03%  - Complexity 6676 6689 +13  ============================================ Files 750 751 +1 Lines 20168 20187 +19 Branches 1978 1982 +4 ============================================ + Hits 18138 18163 +25  + Misses 1435 1432 -3  + Partials 595 592 -3 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
zeitlinger and others added 5 commits March 17, 2025 15:33
…tension/incubator/fileconfig/OpenTelemetryConfigurationModelCustomizerProvider.java Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
@zeitlinger zeitlinger force-pushed the add-config-mode-customizer branch from 0700275 to 5fd3e48 Compare March 17, 2025 15:52
@zeitlinger
Copy link
Member Author

@jack-berg the only failing check is transient - PR can be reviewed 😄

Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small comments, but a good start and something we can iterate on.

Thanks!

Function<? super I, ? extends O1> first, Function<? super O1, ? extends O2> second) {
return (I configured) -> {
O1 firstResult = first.apply(configured);
return second.apply(firstResult);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, we might consider adding opt-in logging to print the out change in the model after each stage of customization, but I'm happy to come back to that type of thing later. This is a good start!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's leave that as a next step then

* @param customizer the customizer to add
*/
void addModelCustomizer(
Function<OpenTelemetryConfigurationModel, OpenTelemetryConfigurationModel> customizer);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realizing that this is going to be a problematic contract from a packaging standpoint..

  • Currently, the SPI lives in opentelemetry-sdk-extension-incubator
  • In the future, we'll want to move it to opentelemetry-sdk-extension-autoconfigure-spi with the rest of the SPIs
  • That leaves a thorny question for where OpenTelemetryConfigurationModel and the rest of the data model lives. First guess would be opentelemetry-sdk-extension-autoconfigure, but that creates a dependency cycle. They could live in opentelemetry-sdk-extension-autoconfigure-spi, or opentelemetry-sdk, or opentelemetry-sdk-common, or some new opentelemetry-sdk-config package.

Idk, let's cross that bridge when we get there.

@jack-berg jack-berg merged commit 000fd0f into open-telemetry:main Mar 21, 2025
28 checks passed
@zeitlinger zeitlinger deleted the add-config-mode-customizer branch March 31, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants