You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define a single canonical span attribute contract that every Respan instrumentation (Python or JS, first-party or OI-delegated) emits. The Respan ingest API at /v2/traces already accepts standard OTLP/HTTP and reads gen_ai.*, llm.*, OpenLLMetry / OpenInference / Traceloop semconv fields directly. The SDK side conforms to that documented API; the backend is not modified.
Today, Python and JS translators have accumulated a parallel set of off-contract respan.* aliases and bare top-level fields (tools, tool_calls, model, prompt_tokens, span_tools, has_tool_calls, etc.) that:
Summary
Define a single canonical span attribute contract that every Respan instrumentation (Python or JS, first-party or OI-delegated) emits. The Respan ingest API at
/v2/tracesalready accepts standard OTLP/HTTP and readsgen_ai.*,llm.*, OpenLLMetry / OpenInference / Traceloop semconv fields directly. The SDK side conforms to that documented API; the backend is not modified.Today, Python and JS translators have accumulated a parallel set of off-contract
respan.*aliases and bare top-level fields (tools,tool_calls,model,prompt_tokens,span_tools,has_tool_calls, etc.) that:respan.span.tools↔llm.request.functions;tool_calls↔gen_ai.completion.0.tool_calls;model↔gen_ai.request.model;prompt_tokens↔gen_ai.usage.prompt_tokens).This issue tracks: (a) landing the contract spec, and (b) migrating each translator off the aliases.
What landed in this issue
docs/SPAN_CONTRACT.md— added in companion PR.Per-translator cleanup (one PR each)
Migrate each translator to emit canonical-only and add a contract test that asserts no aliases are present.
Python
python-sdks/instrumentations/respan-instrumentation-openinference— droprespan.span.tools,respan.span.tool_calls,tools,tool_calls,model,prompt_tokens,completion_tokens,total_request_tokensfrom translator output.python-sdks/instrumentations/respan-instrumentation-anthropic-agents— audit and remove any aliases.python-sdks/instrumentations/respan-instrumentation-openai-agents— audit and remove any aliases.python-sdks/instrumentations/respan-instrumentation-openai— audit (thin wrapper, may already be clean).JavaScript
javascript-sdks/instrumentations/respan-instrumentation-vercel— drop raw-arrayrespan.span.tools/respan.span.tool_calls, drop top-leveltools/tool_calls/span_tools/has_tool_calls/parallel_tool_calls; tool execution spans must not carrytool_calls.javascript-sdks/instrumentations/respan-instrumentation-openinference— audit translator output.javascript-sdks/instrumentations/respan-instrumentation-anthropic— audit.javascript-sdks/instrumentations/respan-instrumentation-claude-agent-sdk— audit.javascript-sdks/instrumentations/respan-instrumentation-openai-agents— audit.javascript-sdks/instrumentations/respan-instrumentation-n8n— audit.respan-sdk constants cleanup
respan_sdk/constants/span_attributes.py— deprecateRESPAN_SPAN_TOOLS,RESPAN_SPAN_TOOL_CALLS,RESPAN_SPAN_HANDOFFSonce no translator emits them.javascript-sdks/respan-sdk/src/types/spanTypes.ts— same deprecation.Definition of done
docs/SPAN_CONTRACT.md./v2/tracesis unchanged. Backend is unchanged.Reference
docs/SPAN_CONTRACT.md