-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(sdk): expose trace IDs for SYNC_PRIMARY and ASYNC emit modes #15744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Change emit_mcp() to return Optional[TraceData] containing trace ID and URN/aspect mapping when available - Change emit_mcps() to return List[TraceData] with one TraceData per batch/chunk - Add get_trace_status() method to query trace status from the server - Trace IDs are extracted from the traceparent response header for all emit modes (previously only extracted for ASYNC_WAIT) - Add comprehensive unit tests for the new functionality This allows users to retrieve trace IDs when using SYNC_PRIMARY and ASYNC emit modes, and provides a method to query trace status later. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Linear: ING-1310 |
❌ 81 Tests Failed:
View the top 3 failed test(s) by shortest run time
View the full list of 5 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
Summary
emit_mcp()to returnOptional[TraceData]containing trace ID and URN/aspect mapping when availableemit_mcps()to returnList[TraceData]with oneTraceDataper batch/chunkget_trace_status()method to query trace status from the servertraceparentresponse header for all emit modes (previously only extracted forASYNC_WAIT)This allows users to retrieve trace IDs when using
SYNC_PRIMARYandASYNCemit modes, and provides a method to query trace status later.Motivation
Previously, trace IDs were only accessible when using
ASYNC_WAITemit mode. Users who wanted to useSYNC_PRIMARY(the default) orASYNCmodes had no way to retrieve trace IDs for debugging or status checking purposes. This change exposes the trace IDs for all emit modes.Example Usage
Test plan
TraceDatareturn functionality (7 tests)get_trace_status()method (6 tests)🤖 Generated with Claude Code