Repository navigation
fix(tracing): keep span events and status messages; judge summary keeps every attribute - #144
Merged
Merged
Conversation
…ps every attribute parse_otlp_json and the protobuf path dropped span events and the status message, so why a span failed (OpenTelemetry records exceptions as an 'exception' event) never reached the store or the judge. Both are now kept (status_message, events) and pass through normalize_span. summarize_for_judge cut each span's JSON at 2,000 characters from the front, so a long input history pushed later attributes such as the model output out of view. It now shortens long values first (max_chars_per_value, halved until the span fits) so every attribute stays visible, and shows a failed span's status message and exception.
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
5 tasks
Resolve summarize_for_judge: keep per-value shortening and failure lines from this branch, and redact attributes and failure text as dev does.
This was referenced Nov 6, 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.
Two tracing gaps found while auditing Open WebUI agents from SimpleAudit Studio.
1. OTLP parsing dropped span events and status messages
parse_otlp_json(JSON) and_spans_from_otlp_dict(gRPC/protobuf) kept only the status code. OpenTelemetry records why a span failed in itsexceptionevent (exception.type,exception.message) and in the status message, so neither the store nor the judge could see the reason.status_messageandevents([{name, time, attributes}]) when present. Spans without them are unchanged (no new keys).normalize_spanpasses both through.2.
summarize_for_judgecut spans from the frontEach span's attribute JSON was cut at
max_chars_per_span(2,000). A model call's longgen_ai.input.messageshistory therefore pushed later attributes, such asgen_ai.output.messages(what the model decided or answered), out of the judge's view.max_chars_per_value(default 600), halved until the span fits, down to 80 characters. Every attribute stays visible, and the old end-cut is only the last resort.status: ERROR — <message>andexception: <type>: <message>lines.max_chars_per_spanis unchanged andmax_chars_per_valueis a new keyword argument.Tests
4 new tests in
tests/test_tracing.py: events and status message parsed, no new keys without them, values shortened with every attribute kept, failure lines rendered.Full suite: 1933 passed (base 1929). The same 10 tests fail with and without this change in my environment. They bind a local OTLP receiver (
test_ephemeral_receiver_*,test_shared_receiver_*,test_audit_with_tracing_*,test_otlp_auth::test_ephemeral_receiver_basic_auth_401_and_200).Studio already works around both gaps (it copies exception attributes before parsing and pre-trims the spans it hands to the judge); this fixes them at the source.