Skip to content

tracing: preserve GenAI content attributes - #99

Merged
SushantGautam merged 2 commits into
mainfrom
fix/traceparent-forwarding
Oct 6, 2026
Merged

SushantGautam merged 2 commits into
mainfrom
fix/traceparent-forwarding

Conversation

@SushantGautam

Copy link
Copy Markdown
Collaborator

Summary

  • add regression coverage for GenAI prompt, output, tool-argument, and retrieval-document attributes
  • verify OTLP JSON normalization preserves these content attributes unchanged

Validation

  • uv sync --extra dev --extra tracing
  • uv run python -m pytest tests/test_tracing.py -q — 39 passed
  • uv run python -m compileall -q simpleaudit

This PR contains the SimpleAudit-side compatibility test for the Open WebUI content-capture release.

SushantGautam and others added 2 commits October 3, 2026 01:14
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>
@SushantGautam
SushantGautam merged commit 95aa155 into main Oct 6, 2026
3 checks passed
@SushantGautam
SushantGautam deleted the fix/traceparent-forwarding branch October 6, 2026 08:49
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