Skip to content

Replace jackson OTLP json serialization with handrolled version#8545

Open
jack-berg wants to merge 1 commit into
open-telemetry:mainfrom
jack-berg:hand-roll-json-serialization
Open

Replace jackson OTLP json serialization with handrolled version#8545
jack-berg wants to merge 1 commit into
open-telemetry:mainfrom
jack-berg:hand-roll-json-serialization

Conversation

@jack-berg

Copy link
Copy Markdown
Member

Related to #8533.

Jackson 3 was released and requires java 17.

We rely on jackson in a variety of places. This PR concerns the serialization functionality we rely on for opentelemetry-exporter-logging-otlp, opentelemetry-exporter-otlp (officially json is not supproted - see #5833).

Rather than try to accommodate different versions of jackson through something like SPI, its simpler to just replace jackson with a hand rolled version, at least for the JSON serialization bits.

We have precedent for hand rolled JSON serialization in JsonEncoding, which is used by Value. However, this operates in very different context than OTLP marshaling and probably shouldn't be merged together.

@jack-berg jack-berg requested a review from a team as a code owner June 26, 2026 16:48
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.01075% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.00%. Comparing base (0225a99) to head (68ef0db).

Files with missing lines Patch % Lines
...elemetry/exporter/internal/marshal/JsonWriter.java 93.10% 8 Missing and 4 partials ⚠️
...etry/exporter/internal/marshal/JsonSerializer.java 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8545      +/-   ##
============================================
+ Coverage     90.97%   91.00%   +0.03%     
- Complexity    10206    10250      +44     
============================================
  Files          1013     1013              
  Lines         27166    27314     +148     
  Branches       3182     3200      +18     
============================================
+ Hits          24713    24857     +144     
- Misses         1729     1730       +1     
- Partials        724      727       +3     

☔ View full report in Codecov by Harness.
📢 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.

@brunobat

brunobat commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Well... I think we have been working on the same :)
See: #8546
I have a bunch of tests in there if you want to use them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants