Skip to content

Add a hook to get early access to trace object before loading#169

Merged
cdamus merged 1 commit into
sokatoafrom
issues/sokatoa-4633
Mar 6, 2026
Merged

Add a hook to get early access to trace object before loading#169
cdamus merged 1 commit into
sokatoafrom
issues/sokatoa-4633

Conversation

@cdamus
Copy link
Copy Markdown
Collaborator

@cdamus cdamus commented Feb 19, 2026

Perfetto plugins in host apps need to be able to access contextual information associated with the trace during loading of the trace and initialization of the plugin instance. This requires that a host app be able to associate information with the trace before the AppImpl's promise result from its various trace loading APIs is resolved at the completion of loading. Accordingly, add an optinoal call-back function parameter to the AppImpl load method implementations to provide this trace early access hook.

For android-graphics/sokatoa#4633

Perfetto plugins in host apps need to be able to access contextual
information associated with the trace during loading of the trace
and initialization of the plugin instance. This requires that a host app
be able to associate information with the trace before the AppImpl's
promise result from its various trace loading APIs is resolved at the
completion of loading. Accordingly, add an optinoal call-back function
parameter to the AppImpl load method implementations to provide this
trace early access hook.

For android-graphics/sokatoa#4633

Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
Copy link
Copy Markdown
Collaborator

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. Repeating the comment everywhere is likely the only way to get it to show on all call sites, but if it's for internal use, it may be overkill.

@cdamus
Copy link
Copy Markdown
Collaborator Author

cdamus commented Mar 6, 2026

Looks reasonable to me. Repeating the comment everywhere is likely the only way to get it to show on all call sites, but if it's for internal use, it may be overkill.

Yeah this was a deliberate choice, a 🚨 to developers to make it clear that this is not an API for general use ◡̈

@cdamus cdamus merged commit d148402 into sokatoa Mar 6, 2026
1 check passed
@cdamus cdamus deleted the issues/sokatoa-4633 branch March 6, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants