fix(profiling): require --time-hint for flamegraph and profile-types trace scoping - #878
Merged
platinummonkey merged 3 commits intoOct 2, 2026
Merged
Conversation
AlexJF
force-pushed
the
fix/profiling-trace-time-hint
branch
from
October 2, 2026 14:08
65ec9ae to
369eb6a
Compare
…trace scoping The backend's traceContext requires traceId, spanId and timeHint (epoch seconds) together and rejects a null timeHint, so `--trace-id` scoping on `explore flamegraph` and `profile-types list` always failed validation. - Build traceContext via the shared trace_context_json helper, which validates the three flags together and converts --time-hint to epoch seconds - Add --time-hint to `profiling explore flamegraph` and `profiling profile-types list` - Assert timeHint in the profile-types trace test; add a flamegraph trace-context request body test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`pup profiling` calls unstable /api/unstable/profiling/pup endpoints, which are supported for the latest pup release plus 30 days for older versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AlexJF
force-pushed
the
fix/profiling-trace-time-hint
branch
from
October 2, 2026 14:30
c7e191f to
8cf8b73
Compare
AlexJF
marked this pull request as ready for review
October 2, 2026 14:43
platinummonkey
approved these changes
Oct 2, 2026
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.
What does this PR do?
Fixes
--trace-idscoping forpup profiling explore flamegraphandpup profiling profile-types list.The backend's
traceContextrequirestraceId,spanIdandtimeHint(epoch seconds) together, and rejects a nulltimeHintwith a 400. Since #819, pup senttimeHint: nulland didn't require--span-id, so both commands failed whenever they were scoped by trace.traceContextvia the sharedtrace_context_jsonhelper from feat(profiling): add continuous profiler callgraph exploration #876. The helper requires--trace-id,--span-idand--time-hinttogether and converts--time-hint(Unix timestamp, RFC3339, relative time, etc.) to epoch seconds.--time-hintflag on both commands (src/main.rs).timeHint, and there's a new flamegraph trace-context request-body test. The helper's own tests are in feat(profiling): add continuous profiler callgraph exploration #876.docs/EXAMPLES.md: the profile-types trace example passes--time-hint.docs/EXAMPLES.md: a note in the Continuous Profiler intro thatpup profilingcalls unstable/api/unstable/profiling/pup/...endpoints with a reduced support guarantee (latest pup release, plus 30 days for older versions).docs/COMMANDS.md: a matching sub-bullet under theprofilingdomain entry, linking to the EXAMPLES.md note.Motivation
Found while adding call graph (#876) and timeline (#877) exploration. Both have the same
traceContextcontract, and #876 applies this fix for call graph.Additional Notes
trace_context_jsonhelper from feat(profiling): add continuous profiler callgraph exploration #876 (merged).--trace-idwithout--span-id/--time-hintis now rejected client-side instead of with a backend 400. Trace scoping never worked before, so this breaks no working usage.Checklist
Related Issues
Fixes trace scoping from #819.
Plan
Prompts
🤖 Generated with Claude Code