Skip to content

fix: accept parameterized OTLP content types - #82

Merged
VibeSWE merged 1 commit into
mainfrom
fix/otlp-content-type-params
Oct 25, 2026
Merged

VibeSWE merged 1 commit into
mainfrom
fix/otlp-content-type-params

Conversation

@VibeSWE

@VibeSWE VibeSWE commented Oct 25, 2026 •

Copy link
Copy Markdown

Description

OTLP logs, metrics, and traces reject valid JSON requests such as Content-Type: application/json; charset=utf-8 because dispatch compares the complete header string. Classify the parsed type/subtype using Actix's existing mime re-export so parameters, media-type case, and surrounding HTTP whitespace no longer prevent ingestion.

Dispatch deliberately ignores parameter text, including malformed parameters, and preserves HTTP 400 responses and existing diagnostics for missing/unsupported headers. Protobuf remains unsupported; parameterized protobuf gets the existing protobuf-specific error. OTLP JSON suffix aliases and gRPC remain out of scope. No dependencies or public interfaces change.

Validation

  • Baseline library suite: 1,045 passed, 0 failed, 2 ignored.
  • Changed library suite: 1,050 passed, 0 failed, 2 ignored. New coverage includes a 45-row classification table and shared request processing for all three signals.
  • Real baseline/changed servers: 40/40 HTTP cases passed on each; 15 requests changed from 400 to successful ingestion, three parameterized protobuf responses gained the expected specific diagnostic, and 22 responses were unchanged, including plain JSON ingestion.
  • Independent 41-case header matrix: no mismatches.
  • cargo clippy --locked --all-targets passed with existing warnings outside the changed file; formatting and whitespace checks passed.
  • Isolated optimized classifier benchmark (21 rounds, two million iterations per round): bare JSON dispatch increased from ~1.2 ns to ~23.4 ns and adds one allocation per request. This measures the classifier with the System allocator, not full ingestion throughput. This tradeoff is accepted.

Backend checks used P_BUILD_NO_UI=1, CARGO_BUILD_JOBS=4, and serialized Cargo commands.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@VibeSWE VibeSWE left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Independent Sol6.1 review of 5d837c7a67d5c8f454654dc6ee67b43c888fcb29 against 547c5118583b8e3884a2b6920c3b5a0ffa675f87: no actionable findings.

The shared OTLP classifier implements the approved essence-only policy, including ignoring malformed parameters, case normalization, and HTTP SP/HTAB trimming. JSON dispatch, original unsupported-header diagnostics, missing/non-text header handling, and protobuf rejection remain consistent with the brief. No additional media-type aliases or plain JSON/Kinesis changes were introduced.

Reviewed the five added tests and the parent-provided validation artifacts matching source SHA-256 b264192148b860074f0ec77c481e865c93588d350854fa0d327c6d18ac40a769: 1,050 passing library tests, both 40-case HTTP runs, and the independent 41-case classifier matrix. No builds or tests were rerun for this review.

@VibeSWE
VibeSWE merged commit abc8faa into main Oct 25, 2026
9 checks passed
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.

1 participant