Repository navigation
Add standalone OTLP JSON Lines reader and writer - #1048
Merged
Merged
Conversation
This was referenced Oct 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an application-independent OTLP JSON Lines reader and writer for log records
and spans, ready for Session-trace recording. No new run-time packages.
Closes #982
Evidence
Before: the review's exact regressions reproduced a finite double changing
from
8.971135692166839e-150to8.97113569216684e-150, and rejectedtimeUnixNano: "4.2e1".After: both exact selectors pass; both regression tests are retained.
All 13 codec tests pass in isolation. Official protocol types verify both
signals, and the specification's log, event, trace and JSON Lines examples
preserve their values.
Collector v0.163.2 read and re-exported two log requests and two span
requests with identical JSON values. Result and reproduction steps are in
docs/research/otlp-file-writer.md.cargo checkandcargo clippy --all-targets -- -D warningspass. The normaldependency package set is identical to
issue-700./usr/bin/time -p scripts/affected-tests issue-700selectedcargo nextest run:2,236 passed, 2 skipped, exit 0. Wall time 2,024.49 seconds, including
compilation and the initial build-lock wait (test execution: 1,954.491 seconds).
Test seams
otlp_jsonlmodule's typed requests,WriterandReader: inspect emitted JSON, decode with OpenTelemetry's official protocol types, and read back through the same public interface. Specification fixtures supply independent expected values.otlp_json_filereceiver reads files emitted through that interface and its file exporter writes the records and spans back.Review
Reviewed against fixed point
issue-700(cd7119f), with independent Standardsand Spec reviewers. Standards' one P3 duplication finding was addressed; Spec's
two P2 behavior findings were reproduced with their exact commands, fixed and
verified with the same commands. Both axes read all 17 changed files, including
the follow-up changes. No generated-output exclusions or unread changed files.
Unaddressed findings
Standards
None.
Spec
None.
Merge Danger
Door: two-way
The codec can be removed without a data migration.
Blast Radius: serialization
serde_json precision features apply across the binary; full Rust validation
covers existing consumers. The official OpenTelemetry dependency is test-only.
Built with codex · gpt-6.1-sol · xhigh