Skip to content

fix(instrumentation-js): repair LangChain, LlamaIndex, and Mastra OTel 2.x spans - #367

Merged
fran3cc merged 2 commits into
respanai:mainfrom
Nightingalelyy:fix/otel2-js-langchain-llama-mastra
Aug 21, 2026
Merged

fix(instrumentation-js): repair LangChain, LlamaIndex, and Mastra OTel 2.x spans#367
fran3cc merged 2 commits into
respanai:mainfrom
Nightingalelyy:fix/otel2-js-langchain-llama-mastra

Conversation

@Nightingalelyy

@Nightingalelyy Nightingalelyy commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve current LangChain callback typing, workflow grouping, agent boundaries, and Langflow component hierarchy
  • export LlamaIndex failures and pending callbacks with sanitized diagnostics and stable id-less callback correlation
  • buffer Mastra children until their parent is exported and propagate late agent failures to model spans
  • add patch release intent for all three instrumentation packages

Validation

  • package builds passed for LangChain, LlamaIndex, and Mastra

  • focused tests passed: 13 + 6 + 4 (23 total)

  • npm pack --dry-run passed for all three packages

  • release inventory and release-intent validation passed

  • complete locally linked example suites passed with marker otel2-fix-js-group-02-20260815T075000Z

  • Respan MCP audit passed for 42 traces and 124 full span records, including tree integrity, content, model/token data, tool execution, expected errors, grouping, and duplicate checks

  • Contribution re-audit against every current document under contribution/ passed after f37d4a8: LangChain text LLMs use canonical chat request type, automatic span-kind and direct model/input/output/token/tool aliases are absent, and tool definitions/current-turn calls use canonical JSON attributes.

  • Fresh correction validation: all three package builds and 23/23 focused tests passed; release inventory/intents and diff checks passed; marker otel2-pr367-contract-correction-20260818T133700Z produced 3/3 representative LangChain traces and all 3 full records were inspected for chat/text/tool semantics, content, usage, aliases, and duplicates.

External follow-ups

  • None documented.

Companion examples

@Nightingalelyy
Nightingalelyy marked this pull request as ready for review August 15, 2026 14:40

@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.

@Nightingalelyy Nightingalelyy changed the title fix(instrumentations): repair LangChain, LlamaIndex, and Mastra spans fix(instrumentation): repair LangChain, LlamaIndex, and Mastra OTel 2.x spans Aug 17, 2026
@Nightingalelyy
Nightingalelyy marked this pull request as draft August 18, 2026 03:32
@Nightingalelyy Nightingalelyy changed the title fix(instrumentation): repair LangChain, LlamaIndex, and Mastra OTel 2.x spans fix(instrumentation-js): repair LangChain, LlamaIndex, and Mastra OTel 2.x spans Aug 18, 2026
@Nightingalelyy
Nightingalelyy marked this pull request as ready for review August 19, 2026 15:58

@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 0b96d55 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