Skip to content

perf(instrumentation): [Generated metadata 2] Generate manifest metadata - #1405

Merged
romtsn merged 10 commits into
mainfrom
perf/generated-sdk-metadata-manifest
Aug 25, 2026
Merged

perf(instrumentation): [Generated metadata 2] Generate manifest metadata#1405
romtsn merged 10 commits into
mainfrom
perf/generated-sdk-metadata-manifest

Conversation

@romtsn

@romtsn romtsn commented Aug 13, 2026

Copy link
Copy Markdown
Member

Generate typed Sentry metadata from each variant final merged manifest in the app-owned build-time options class.

The SDK ASM transform remains parameterless and emits only a stable symbolic call. Resource-backed or otherwise unresolved values return null so the SDK retains its PackageManager fallback. The matching SDK consumer is getsentry/sentry-java#5969.

@romtsn
romtsn force-pushed the perf/generated-sdk-metadata-manifest branch 2 times, most recently from 45fffeb to d6e0617 Compare August 17, 2026 08:36
@romtsn
romtsn force-pushed the perf/generated-sdk-metadata-availability branch from 5b50fc6 to 01c33f8 Compare August 17, 2026 08:50
@romtsn
romtsn marked this pull request as ready for review August 17, 2026 09:09
@romtsn
romtsn force-pushed the perf/generated-sdk-metadata-manifest branch from d6e0617 to ca575d9 Compare August 17, 2026 09:12
@romtsn
romtsn force-pushed the perf/generated-sdk-metadata-availability branch from 01c33f8 to d6cc1ee Compare August 17, 2026 09:57
@romtsn
romtsn force-pushed the perf/generated-sdk-metadata-manifest branch from ca575d9 to a819c4f Compare August 17, 2026 10:01

@runningcode runningcode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks great! main concern is the separate of responsibilities. and we should also add a configuration cache test for this!

}
.toSet()
val availability = resolveClassAvailability(modules)
val metadata = ManifestMetadataParser.parse(mergedManifest.get().asFile)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if I understand the architecture correctly it seems like we have 3/4 concerns that i would separate this in to 3 tasks. this improves the cacheability and separates responsibilities:

  1. resolving the class availability
    2 parsing the manifest
    3 merging the two / generating the source file

@romtsn romtsn Aug 19, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

hm, I'm thinking if an intermediate file I/O and task scheduling that we would introduce by splitting this up would cost more than the work avoided by cacheability? It's map lookup + XML parsing which I guess should be rather quick?

Comment thread CHANGELOG.md Outdated
@romtsn

romtsn commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

we should also add a configuration cache test for this!

thanks for the review - this one has been addressed in #1404 and should cover this too :)

@romtsn
romtsn force-pushed the perf/generated-sdk-metadata-availability branch from a965436 to e193d84 Compare August 24, 2026 13:00
@romtsn
romtsn force-pushed the perf/generated-sdk-metadata-manifest branch from 1f5ce9f to b565999 Compare August 24, 2026 13:09
Base automatically changed from perf/generated-sdk-metadata-availability to main August 24, 2026 15:25
romtsn and others added 4 commits August 25, 2026 10:53
Read resolved Sentry metadata from the final merged manifest in the generated-source task. Keep the SDK transform parameterless by emitting a stable call to the app-owned generated class, with PackageManager fallback for unresolved resources.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Inject generated manifest metadata directly into ManifestMetadataReader while retaining structural compatibility checks.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Describe the initialization improvement without citing benchmark-specific percentages.

Co-Authored-By: Codex <noreply@openai.com>
@romtsn
romtsn force-pushed the perf/generated-sdk-metadata-manifest branch from b565999 to f66bc28 Compare August 25, 2026 08:55
romtsn and others added 2 commits August 25, 2026 11:48
Cache class availability and parsed manifest metadata independently so changes to either input avoid repeating unrelated work.

Co-Authored-By: Codex <noreply@openai.com>
Keep the build-time option tasks together under an optimization package as their responsibilities expand.

Co-Authored-By: Codex <noreply@openai.com>
romtsn and others added 2 commits August 25, 2026 11:57
Place generated sources and intermediate files below build/sentry so AGP-owned output directories remain separate.

Co-Authored-By: Codex <noreply@openai.com>
Allow the first configuration-cache test build to restore the cacheable generator task from the shared TestKit build cache. Keep requiring the second build to be up to date.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

@runningcode runningcode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

left some comments below

Remove redundant directory creation from tasks whose complete output file paths are declared to Gradle.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Report build-time manifest metadata inference failures through the opt-out-aware telemetry service while preserving the runtime fallback.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
@romtsn
romtsn merged commit dd34d1f into main Aug 25, 2026
24 checks passed
@romtsn
romtsn deleted the perf/generated-sdk-metadata-manifest branch August 25, 2026 18:03
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