processmanager: add TraceInterceptor extension point#1383
Open
gnurizen wants to merge 4 commits into
Open
Conversation
christos68k
reviewed
May 1, 2026
Add an optional TraceInterceptor that ProcessManager.HandleTrace invokes after symbolization and before reporting. Returning true from the interceptor consumes the trace and the default reporting path is skipped; returning false lets HandleTrace report it normally. Consumers that need to report intercepted traces are expected to do so via their own TraceReporter — the hook is intentionally a one-way handoff, not a passthrough callback. There is no behavior change when no interceptor is installed. The interceptor is configured via ProcessManager.SetInterceptor, with a pass-through Tracer.SetInterceptor for callers using the Tracer wrapper.
eaaf131 to
a9e7e33
Compare
4 tasks
Contributor
Author
|
RFAL, thanks! |
christos68k
reviewed
May 4, 2026
christos68k
approved these changes
May 4, 2026
christos68k
reviewed
May 4, 2026
christos68k
reviewed
May 4, 2026
Contributor
Author
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
Adds an optional
TraceInterceptorextension point toProcessManager. The interceptor is invoked fromHandleTraceafter symbolization and before reporting; returningtrueconsumes the trace andHandleTraceskips its default reporting path, returningfalseletsHandleTracereport it normally. There is no behavior change when no interceptor is installed.The hook is intentionally a one-way handoff, not a passthrough callback. Consumers that need to report intercepted traces are expected to do so via their own downstream mechanism.
Motivation
Some symbolization sources arrive on a separate channel from the eBPF stack walker and only become available some time after the original sample. Today there is no clean way to plug additional symbolization or merging into the post-symbolization, pre-report path without forking the project. This change adds a single, narrowly-scoped hook so out-of-tree code can: