docs(config): Document ObjectMapper config#8075
docs(config): Document ObjectMapper config#8075MikeGoldsmith wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
Spring starter needs same ObjectMapper config but can't access package-private field without reflection. New public internal class provides access. Fixes open-telemetry#7843
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8075 +/- ##
============================================
+ Coverage 90.20% 90.21% +0.01%
- Complexity 7593 7606 +13
============================================
Files 841 841
Lines 22913 22923 +10
Branches 2289 2291 +2
============================================
+ Hits 20668 20680 +12
+ Misses 1529 1526 -3
- Partials 716 717 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@zeitlinger / @trask is this still needed from the instrumentation side? The last comment in the issue indicates a preference for copy / paste rather than letting consumers leverage the same object mapper:
My perspective: in addition to not relying on internal APIs, I don't like being in the business of having an API (public or internal) to access a jackson |
Per maintainer feedback, avoid exposing ObjectMapper API (internal or public). Instead, document configuration for copy-paste approach. - Move ObjectMapper back from YamlObjectMapper to DeclarativeConfiguration - Add "For Implementers" section in javadoc with setup example - Add field javadoc explaining config and referencing class docs - Remove YamlObjectMapper.java
|
@jack-berg thanks for feedback. I misunderstood the original ask, so sticking with simple docs approach is good. I've updated the PR to just document how to configure the ObjectMapper. Let me know what you think 😄 |
Summary
Documents ObjectMapper configuration for external consumers via copy-paste approach instead of exposing internal API. Per maintainer feedback, avoids coupling by providing documentation rather than API access.
Addresses #7843
Background
Spring starter needs same ObjectMapper config to parse OpenTelemetry YAML. Three approaches considered:
Changes
DeclarativeConfigurationjavadoc with complete ObjectMapper setup exampleMAPPERexplaining configurationTesting