Add CPU profiling integration with span correlation#95
Merged
Conversation
Adds `profiling` feature that integrates tauri-plugin-profiling with tracing span correlation: - TracedProfilingExt: wraps profiling with automatic spans and logging - SpanTimingLayer: captures span enter/exit timing for correlation - SpanAwareProfilingExt: CPU profiling with span correlation report - SpanCorrelationReport: shows which spans were active during profiling This enables correlating CPU samples with tracing spans to understand which logical operations consume CPU time.
Demonstrates the profiling integration by adding: - SpanTimingLayer setup for span timing capture - run_profiled_work command showing SpanAwareProfilingExt usage - Example instrumented functions with CPU-intensive work
- Update README with profiling feature in features list - Add 8 integration tests for profiling types and SpanTimingLayer - Fix doc examples to use correct generate_context path - Fix doc examples to include use tauri::Manager
Contributor
Package Changes Through d46e2a0There are 2 changes which include tracing with minor, tracing-js with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Merged
johncarmack1984
pushed a commit
that referenced
this pull request
Jan 14, 2026
# Version Updates Merging this PR will release new versions of the following packages based on your change files. # tracing ## [0.3.2] - 97f668f (#95 by @johncarmack1984) Add CPU profiling integration with span correlation via new `profiling` feature. Includes `TracedProfilingExt` for automatic span/logging around profiles, `SpanTimingLayer` for capturing span timing, and `SpanAwareProfilingExt` for correlating CPU samples with active tracing spans. # tracing-js ## [0.3.2] - 97f668f (#95 by @johncarmack1984) Add CPU profiling integration with span correlation via new `profiling` feature. Includes `TracedProfilingExt` for automatic span/logging around profiles, `SpanTimingLayer` for capturing span timing, and `SpanAwareProfilingExt` for correlating CPU samples with active tracing spans. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
profilingfeature flag that integrates withtauri-plugin-profilingfor sampling-based CPU profilingTracedProfilingExttrait for automatic span creation and logging around profilesSpanTimingLayerfor capturing span enter/exit timing during profilingSpanAwareProfilingExttrait for correlating CPU samples with active tracing spansProfileResult,ProfilingConfig,StartOptions, etc.)Test plan
just checkpasses (157 tests, up from 149)generate_context!pathsSpanTimingLayer,SpanTimingCapture, and type exportscustom-subscriberexample demonstrates span-aware CPU profiling