feat(frontend): resolve symbol-ref trees after the final merge#5334
Open
jake-kramer wants to merge 5 commits into
Open
feat(frontend): resolve symbol-ref trees after the final merge#5334jake-kramer wants to merge 5 commits into
jake-kramer wants to merge 5 commits into
Conversation
jake-kramer
force-pushed
the
symbolizer/symbolref-querybackend
branch
from
July 9, 2026 12:58
bf07b02 to
b35585e
Compare
jake-kramer
force-pushed
the
symbolizer/symbolref-frontend
branch
from
July 9, 2026 12:58
6dd2d2d to
804590a
Compare
This was referenced Jul 9, 2026
Contributor
Author
|
This change is part of the following stack:
Change managed by git-spice. |
This was referenced Jul 9, 2026
jake-kramer
force-pushed
the
symbolizer/symbolref-querybackend
branch
from
July 9, 2026 20:53
b35585e to
ed670ba
Compare
jake-kramer
force-pushed
the
symbolizer/symbolref-frontend
branch
from
July 9, 2026 20:53
445de3d to
2c09212
Compare
jake-kramer
marked this pull request as ready for review
July 9, 2026 21:10
jake-kramer
requested review from
a team,
aleks-p,
bryanhuhta,
korniltsev-grafanista and
marcsanmi
as code owners
July 9, 2026 21:10
jake-kramer
force-pushed
the
symbolizer/symbolref-frontend
branch
from
July 13, 2026 14:58
2c09212 to
8507190
Compare
jake-kramer
force-pushed
the
symbolizer/symbolref-querybackend
branch
from
July 13, 2026 14:58
ed670ba to
0be5140
Compare
jake-kramer
force-pushed
the
symbolizer/symbolref-frontend
branch
from
July 13, 2026 19:05
8507190 to
6e124dc
Compare
jake-kramer
force-pushed
the
symbolizer/symbolref-querybackend
branch
2 times, most recently
from
July 13, 2026 19:27
08e755d to
cf93b5b
Compare
jake-kramer
force-pushed
the
symbolizer/symbolref-frontend
branch
from
July 13, 2026 19:27
6e124dc to
4fa35d0
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4fa35d0. Configure here.
jake-kramer
force-pushed
the
symbolizer/symbolref-frontend
branch
from
July 13, 2026 19:48
4fa35d0 to
ae84568
Compare
jake-kramer
force-pushed
the
symbolizer/symbolref-querybackend
branch
2 times, most recently
from
July 14, 2026 19:46
cf67a51 to
c2b9c2a
Compare
jake-kramer
force-pushed
the
symbolizer/symbolref-frontend
branch
from
July 14, 2026 19:46
ae84568 to
2585589
Compare
simonswine
approved these changes
Jul 15, 2026
Behind a new per-tenant flag (symbolizer.symbol-ref-trees-enabled, default off), tree and span-profile queries request symbol-ref tree reports instead of being rewritten through the pprof path when symbolization is needed. When a merged report carries unresolved references, the frontend groups them by binary, resolves each through the symbolizer's address-level API under bounded concurrency and a per-binary timeout, and rebuilds the final tree -- unresolved locations render the existing binary!0xaddr fallback. A per-binary timeout degrades that binary to fallbacks; cancellation of the request context fails the request, matching existing symbolization error handling. The concurrency bound comes from the existing max-debuginfod-concurrency configuration, shared with the pprof path. With the flag off, request construction and the legacy symbolization path are byte-identical to today. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
-symbolizer.symbol-ref-trees-enabled and -symbolizer.resolve-timeout appear in -help-all, which TestHelp pins against cmd/pyroscope/ help*.txt.tmpl. Regenerate the golden so TestHelp passes; the flags are doc:"hidden" so the reference docs were unaffected, but the raw help output was not. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rder lidia's Lookup returns inline chains innermost-first, mirroring pprof Line order, while symbolref.Rebuild splices resolved chains into rebuilt stacks root-first, outermost caller first — the order its own tests pin. buildLookup copied chains through unchanged, so multi-frame inlined locations rendered with parent and child flipped relative to the legacy pprof path. Reverse at the lookup boundary. Reported by cursor bugbot. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
useSymbolRefTrees gated only on the symbol-ref feature flag, so a tenant with symbolization disabled could still be routed onto the symbol-ref path. Require limits.SymbolizerEnabled alongside SymbolRefTreesEnabled. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nant limit Rework the symbol-ref request path onto the SymbolMode enum: the per-tenant flag now sets SYMBOL_MODE_REFS instead of the dropped symbol_refs bool, and carries the new per-tenant symbolizer.max-unresolved-locations limit (smallest across request tenants) on the query for the backend to enforce while building and merging. The frontend re-checks the merged count before starting any resolution, guarding against results that predate the backend check, and consumes UnresolvedBinaries' validating two-value form. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jake-kramer
force-pushed
the
symbolizer/symbolref-frontend
branch
from
July 16, 2026 01:54
2585589 to
f2a55f0
Compare
jake-kramer
force-pushed
the
symbolizer/symbolref-querybackend
branch
from
July 16, 2026 01:54
c2b9c2a to
9425349
Compare
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.

Part of a series: symbol-aware tree references (6 of 8)
Full context and series overview: #5317 (PR 1). Compact map:
ResolveAPI (feat(symbolizer): expose address-level symbol resolution as a public API #5317)SymbolRefTable+ tree query/report fields (feat(query): add SymbolRefTable and symbol_refs tree fields to the query API #5318)model/symbolref: intern table + merge rebasing (feat(model): add symbolref package for symbol-aware tree references #5321)model/symbolref: unresolved-binary grouping + tree rebuild (feat(model): add unresolved-binary grouping and tree rebuild to symbolref #5322)Tracking issue: grafana/pyroscope-squad#487. Based on #5333's branch.
What
The activation PR. Behind a new per-tenant flag
symbolizer.symbol-ref-trees-enabled(default off), tree and span-profile queries request symbol-ref tree reports instead of being rewritten through the pprof path when symbolization is needed. With the flag off, request construction and the legacy symbolization path are byte-identical to today — that's the rollback story.When a merged report comes back with unresolved references, the frontend:
symbolref.UnresolvedBinaries),max-debuginfod-concurrency, shared with the pprof path) and a per-binary timeout (symbolizer.resolve-timeout, default 20s),symbolref.Rebuild), rendering the existingbinary!0xaddrfallback for anything unresolved.Error semantics: a per-binary timeout degrades that one binary to fallbacks and lets the query succeed; cancellation of the request context fails the query, matching how
SymbolizePproferrors are already handled at these call sites.Observability
A single unsampled counter,
symbol_ref_locations_total{result=resolved|miss|timeout}, drives the fallback-rate signal (an alert can't be built on sampled traces). The per-request detail — resolution timing, binary count, unresolved-reference count — lives on aresolveSymbolRefstracing span instead of dedicated metrics.Testing
go test ./pkg/frontend/... ./pkg/validation/... -racegreen. Tests cover: flag off ⇒ byte-identical legacy behavior (existingshouldSymbolizetests untouched); flag on ⇒ symbol-ref request, no legacy wrapper; old-backend/degenerate responses pass through; per-buildID resolution with sorted/deduped addresses and fallback on miss; per-binary timeout ⇒ fallback + query succeeds; request-context cancellation ⇒ query fails; multi-tenant all-tenants gating.golangci-lintclean; whole-repo build clean.