Repository navigation
refactor(profiling): support native logical span links - #20346
taegyunkim wants to merge 8 commits into
Conversation
Circular import analysis
|
Dependency direction analysis
|
Codeowners resolved asResolved from the full PR diff against |
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🔗 Commit SHA: 6059428 | Docs | View more details | Give us feedback! |
…native-span-links
|
Superseded by the rewritten runtime-specific stack. Native reset now lives in #20347, shared keyed storage and task-specific operations are introduced with the asyncio consumer in #19736, and greenlet-specific operations are introduced with the gevent consumer in #19420. The generic logical-span API and exported domain constants were removed. |
Description
Stacked on #20344.
Generalize the native span-link manager from thread-only keys to
(domain, identifier)keys. Preserve the existing physical-thread methods while adding private native operations for asyncio task and gevent greenlet targets, finished-span cleanup across all domains, and explicit reset support.This layer intentionally does not expose runtime tracking queries or change task or greenlet rendering. Those queries are added alongside their first consumers in the asyncio and gevent PRs. Until the corresponding Python provider is added, task samples continue using the existing physical-thread attribution behavior.
Testing
scripts/lint checksscripts/lint profiling-native-checkscripts/run-tests --venv 1ed51fescripts/run-benchmarks --list ...Risks
The native manager's internal key and reverse-index representations change. Existing thread operations retain their API and locking behavior, and the profiling suite rebuilt and exercised the native extension.
Fork handling reconstructs the generalized maps in place using the existing child-process safety pattern. No new GIL acquisition, Python object ownership, allocator hook, or unbounded iteration behavior is introduced.
Additional Notes
No release note is needed because this is an internal foundation with no customer-visible behavior change. Asyncio task rendering and Python lifecycle routing are intentionally deferred to follow-up PRs.
Review this stack in order: