Skip to content

fix(otel): add GenAI fallbacks to direct extraction helpers - #249

Open
jakepresent wants to merge 1 commit into
mainfrom
jake/otel-genai-direct-extraction
Open

fix(otel): add GenAI fallbacks to direct extraction helpers#249
jakepresent wants to merge 1 commit into
mainfrom
jake/otel-genai-direct-extraction

Conversation

@jakepresent

Copy link
Copy Markdown
Collaborator

Summary

  • Adds OTel GenAI (gen_ai.*) fallbacks to direct extraction helpers: span, trajectory, and session extraction.
  • Makes SpanNode.to_dict() / TREE and CHUNKED judge extraction serialize GenAI model metadata, messages, tool spans, and event/message-carried tool calls instead of leaving fields blank.
  • Preserves OpenInference precedence for dual-emitting spans and keeps existing OpenInference truncation behavior for raw tool args.

Fixes #241

Tests

  • python -m py_compile assert_ai/core/otel.py tests/test_otel_genai.py
  • python -m pytest tests/test_otel_genai.py::TestGenAIDirectExtractionFollowup tests/test_otel_genai.py tests/test_framework_agnostic.py -q — 162 passed, 1 skipped
  • python -m pytest tests/ -q — first run hit a transient heartbeat timing failure in tests/test_runtime_safety.py::test_heartbeat_writes_manifest_periodically; targeted rerun passed
  • python -m pytest tests/ -q — 1091 passed, 19 skipped, 1 warning, 474 subtests passed

Note: the fresh worktree has no viewer/node_modules, so the full-suite run temporarily symlinked viewer/node_modules from the main checkout and removed the symlink afterward.

@AaronAspinwall123

Copy link
Copy Markdown
Collaborator

@jakepresent looks stale, please update

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.

Add GenAI fallbacks to direct OTel extraction helpers

3 participants