Repository navigation
feat(supervisor): accept OTLP/HTTP JSON in the agent trace relay - #5466
ericcurtin wants to merge 2 commits into
Conversation
Transcode JSON to protobuf before enrichment. Signed-off-by: Eric Curtin <eric.curtin@docker.com>
|
recheck |
|
@rhuss @krishicks PTAL when you get a chance. Could you add an area label and |
rhuss
left a comment
There was a problem hiding this comment.
cc-review Summary
What Went Well
Encoding::of(lines 455-465) parses the media type once, and the same value picks the decoder and the response encoding.- JSON is transcoded to protobuf and then goes through the same
enrichment::enrichcall inside the existing enrichment semaphore, so attribution has one implementation andMAX_ENRICHED_BYTESstill applies. replyreaches every rejection, so 404, 408, 413, 415 and 503 (withRetry-After) all answer in the request's content type.json_request_is_transcoded_enriched_and_answered_in_jsonchecks the exact hex-decoded trace and span ID bytes and both attribution attributes, andother_content_types_are_unsupportedwas updated rather than deleted.
Findings
| Severity | File | Description | Source |
|---|---|---|---|
| Minor | Cargo.toml:73 | with-serde is turned on in the workspace-wide opentelemetry-proto entry, but only openshell... |
architecture |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:198 | success(encoding.unwrap_or(Encoding::Protobuf)) repeats the fallback that line 187 already sto... |
architecture |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:284 | The JSON transcode (serde_json::from_slice plus encode_to_vec) runs inline in the async hand... |
production |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:478 | The JSON path decodes the whole request, but the crate docs still describe a protobuf-only relay... | architecture |
| Critical | crates/openshell-supervisor/src/otlp_relay/receiver.rs:483 | The { count doesn't bound what serde_json::from_slice allocates. In opentelemetry-proto 0.... |
security |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:483 | body.split(|byte| *byte == b'{').count() returns the number of braces plus one, so a body with... |
architecture |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:484 | The JSON cap returns EnrichError::TooManyResourceSpans, whose message is "more than 512 resour... |
architecture |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:486 | Some valid OTLP/JSON gets a 400. {"arrayValue":{}} and {"kvlistValue":{}} (an empty list wit... |
correctness |
| Notable | crates/openshell-supervisor/src/otlp_relay/receiver.rs:486 | Issue #5319 lists "Claude Code with detailed beta tracing, pointed at the relay endpoint, produc... | goal-alignment |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:488 | The 400 body carries error.to_string() from serde_json, which includes the whole offending str... |
security |
| Notable | crates/openshell-supervisor/src/otlp_relay/receiver.rs:513 | rejected() still logs 400, 413 and 415 responses only at debug level, and RelayCounters coun... |
production |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:838 | json_body() sends "kind":1 and string-encoded startTimeUnixNano/endTimeUnixNano, but js... |
test-quality |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:888 | json_body_of_tiny_objects_is_too_large_and_never_buffered checks the status, the content type... |
test-quality |
| Minor | crates/openshell-supervisor/src/otlp_relay/receiver.rs:899 | metrics_and_logs_json_are_acknowledged_with_an_empty_object posts only to /v1/logs and, unli... |
test-quality |
Review Details
These findings were produced by cc-review's reviewer agents and posted without a per-finding review. Most failure scenarios were derived from reading the code; the measured figures (memory, timings, error sizes) come from small probe programs that the reviewer agents built and ran against this PR's transcode_json and locked dependency versions, not from running the relay itself.
- Findings posted: 14
- Findings reviewed and not posted: 0
- Gate outcome: FAIL
- Participating reviewers: architecture, correctness, goal-alignment, production, security, test-quality, gator
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
|
@rhuss @TaylorMutch All threads addressed in 11422cd. PTAL when you get a chance. It needs an area label and |
Summary
The agent trace relay now accepts OTLP/HTTP JSON as well as protobuf.
Related Issue
Closes #5319
Changes
{}on successwith-serdeonopentelemetry-protofor the supervisor onlyTesting
Checklist