Skip to content

fix(instrumentation-py): repair Cursor SDK, Dify, and DSPy OTel 2.x spans - #378

Merged
fran3cc merged 2 commits into
respanai:mainfrom
Nightingalelyy:fix/otel2-py-cursor-dify-dspy
Aug 21, 2026
Merged

fix(instrumentation-py): repair Cursor SDK, Dify, and DSPy OTel 2.x spans#378
fran3cc merged 2 commits into
respanai:mainfrom
Nightingalelyy:fix/otel2-py-cursor-dify-dspy

Conversation

@Nightingalelyy

@Nightingalelyy Nightingalelyy commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • emit connected failed Cursor agent roots on cancellation and retain state when terminal export fails
  • map only provider-exposed Dify models, including terminal streaming usage, without inventing model or cost aliases
  • lock DSPy agent/module spans to the common-only contract
  • add one patch release intent for all three instrumentations

Validation

  • Cursor SDK: 6 passed

  • Dify: 8 passed

  • DSPy: 16 passed, 1 opt-in live test skipped

  • clean wheels built for all three packages

  • release inventory and release-intent validation passed

  • corresponding examples: 15/15 completed under otel2-fix-py-group-12-20260816T142858Z

  • Respan MCP: 15/15 trace trees and 77/77 full records inspected; counts and parent links match, no duplicates/orphans/blank critical content

  • expected Cursor cancellation is the only failed record (499)

  • Contribution re-audit against every current document under contribution/ passed after f9c9a0e: every DSPy LLM surface now uses canonical llm.request.type=chat, including text-completion models.

  • Fresh correction validation: Cursor SDK 6 passed, Dify 8 passed, DSPy 16 passed / 1 skipped; DSPy wheel, release inventory/intents, formatting/import, and diff checks passed; marker otel2-pr-contract-corrections-20260818T133300Z produced 1 connected DSPy trace / 5 full records, all inspected.

External follow-ups

  • Dify completion still projects as chat and operation-specific entity names still render as generic task/workflow nodes. The emitted attributes follow the contribution contract, so those remain backend presentation issues.

Companion examples

Emit Cursor cancellation roots with retry-safe state cleanup, preserve provider-exposed Dify models, and lock DSPy agent spans to the common-only contract.
@Nightingalelyy Nightingalelyy changed the title fix(instrumentations): repair cursor-sdk, dify, and dspy spans fix(instrumentation): repair Cursor SDK, Dify, and DSPy OTel 2.x spans Aug 17, 2026
@Nightingalelyy Nightingalelyy changed the title fix(instrumentation): repair Cursor SDK, Dify, and DSPy OTel 2.x spans fix(instrumentation-py): repair Cursor SDK, Dify, and DSPy OTel 2.x spans Aug 18, 2026
@Nightingalelyy
Nightingalelyy marked this pull request as ready for review August 19, 2026 15:50

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