feat(libsy): export outcome evidence as JSON - #660
Closed
nachiketb-nvidia wants to merge 3 commits into
Closed
Conversation
Signed-off-by: nachiketb <nachiketb@nvidia.com>
|
Signed-off-by: nachiketb <nachiketb@nvidia.com>
Signed-off-by: nachiketb <nachiketb@nvidia.com>
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.
What
Export optional outcome evidence as one JSON string attribute,
evidence, on the existinglibsy.runspan.Why
The current seven-field mapping drops custom keys and nested data. Algorithms should be able to define their evidence without changing the telemetry implementation.
How
evidence.*fields and mapping loops with one JSON display value.Consumer example
The span attribute is a string containing JSON:
{"source":"llm-classifier","score":0.9,"custom":{"accepted":true}}Consumers decode it:
What to review
This replaces the previous
evidence.source,evidence.score, and other individual fields. Queries must parseevidenceinstead.All custom evidence is now exported without filtering or redaction. Callers must keep it small and free of private data. Host/backend string limits may truncate the JSON. Existing request-metadata and error handling are unchanged.
This is separate from the docs-only PR #659 and based on main. Its new reference page will need matching wording when both changes land.
Validation
cargo clippy --workspace --all-targets -- -D warningspassed.cargo fmt --all --checkandgit diff --checkpassed.Scope: 3 Rust files, +38 / -50 lines.