Skip to content

fix(instrumentation-py): repair LiveKit, LlamaIndex, and Marqo OTel 2.x spans - #383

Merged
fran3cc merged 2 commits into
respanai:mainfrom
Nightingalelyy:fix/otel2-py-livekit-llamaindex-marqo
Aug 21, 2026
Merged

fix(instrumentation-py): repair LiveKit, LlamaIndex, and Marqo OTel 2.x spans#383
fran3cc merged 2 commits into
respanai:mainfrom
Nightingalelyy:fix/otel2-py-livekit-llamaindex-marqo

Conversation

@Nightingalelyy

@Nightingalelyy Nightingalelyy commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • mark LiveKit LLMStream calls as streaming, derive provider identity from the LiveKit plugin/model instead of the gateway host, preserve canonical tool schema/calls, and remove temporary transport attributes before export
  • classify only actual LlamaIndex BaseTool.call/acall executions as tools; keep orchestration phases as tasks and cover a registered real ReAct runtime with exactly one multiply_numbers execution
  • serialize Marqo SDK identities into stable bounded data, redact endpoint userinfo/query/fragment secrets, and cover current real-client success plus 503 failure without hiding duplicate spans
  • add patch release intent for all three instrumentation packages

Validation

  • focused tests: LiveKit 8/8, LlamaIndex 24/24 plus one credential-gated skip, Marqo 3/3 (35 passed, 1 skipped)

  • Ruff check and format-check passed for every changed Python file

  • wheels built successfully for all three packages

  • release inventory, release-intent, missing-intent, and diff checks passed

  • all validation environments resolved the three instrumentations and local Respan core packages through editable local direct_url.json entries

  • corresponding examples passed 12/12 with marker otel2-fix-py-group-17-20260817T111735Z

  • Respan MCP: 12 connected traces / 58 full records; one root per tree, matching counts, no duplicate IDs or orphan parents; every full record inspected for hierarchy, type, content, model/provider, usage, tools, errors, grouping, and exact marker

  • final LiveKit correction rerun otel2-fix-py-group-17-livekit-clean-20260817T112900Z: 5 traces / 7 records, provider openai, stream=true, exact usage, complete tool schema/call, and no internal transport-key leak

  • Contribution re-audit against every current document under contribution/ passed after 2b64d6c: LlamaIndex text-completion events use the permitted text log type and canonical llm.request.type=chat.

  • Fresh correction validation: LiveKit 8/8, LlamaIndex 24/24 plus 1 skipped, and Marqo 3/3 passed; LlamaIndex wheel, release inventory/intents, formatting/import, and diff checks passed; marker otel2-pr-contract-corrections-20260818T133300Z produced 1 connected LlamaIndex trace / 2 full records, both inspected.

External follow-ups

  • full-detail convenience tools / tool_calls arrays remain empty despite canonical tool attributes/content
  • LlamaIndex agent model and task/workflow display names require backend/UI derivation under the common-span contract
  • Marqo native ERROR spans retain the 503 exception but ingest as success/200 with trace error_count=0

Companion examples

@Nightingalelyy Nightingalelyy changed the title fix(instrumentation): repair LiveKit, LlamaIndex, and Marqo OTel 2.x spans fix(instrumentation-py): repair LiveKit, LlamaIndex, and Marqo OTel 2.x spans Aug 18, 2026
@Nightingalelyy
Nightingalelyy marked this pull request as ready for review August 19, 2026 15:59

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@fran3cc
fran3cc merged commit 8954f23 into respanai:main Aug 21, 2026
5 checks passed
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.

2 participants