Repository navigation
tracing: preserve GenAI content attributes - #99
Merged
Merged
Conversation
The engine builds a per-turn TargetContext whose trace_headers carry the scenario's W3C traceparent, but the default ModelTarget client path dropped the context before the call, so instrumented targets never saw the trace context and exported spans under their own unrelated trace ids. send() now passes context into _client_send, which merges context.trace_headers into extra_headers (user-supplied extra_headers preserved); the AnyLLM/OpenAI-SDK path forwards that to the request. Version pinned to 0.3.0 to match the downstream Studio pin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Summary
Validation
uv sync --extra dev --extra tracinguv run python -m pytest tests/test_tracing.py -q— 39 passeduv run python -m compileall -q simpleauditThis PR contains the SimpleAudit-side compatibility test for the Open WebUI content-capture release.