Remove vendored code and upgrade to async profiler 4.2#4856
Merged
Conversation
Collaborator
Author
|
@sentry review |
Collaborator
Author
|
@cursor review |
...y-async-profiler/src/main/java/io/sentry/asyncprofiler/profiling/JavaContinuousProfiler.java
Show resolved
Hide resolved
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 806307f | 357.85 ms | 424.64 ms | 66.79 ms |
| ee747ae | 554.98 ms | 611.50 ms | 56.52 ms |
| 17a0955 | 372.53 ms | 446.70 ms | 74.17 ms |
| 2124a46 | 319.19 ms | 415.04 ms | 95.85 ms |
| 9fbb112 | 404.51 ms | 475.65 ms | 71.14 ms |
| b6702b0 | 395.86 ms | 409.98 ms | 14.12 ms |
| ee747ae | 357.79 ms | 421.84 ms | 64.05 ms |
| 27d7cf8 | 314.17 ms | 347.00 ms | 32.83 ms |
| 9fbb112 | 361.43 ms | 427.57 ms | 66.14 ms |
| 96449e8 | 361.30 ms | 423.39 ms | 62.09 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 806307f | 1.58 MiB | 2.10 MiB | 533.42 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| 17a0955 | 1.58 MiB | 2.10 MiB | 533.20 KiB |
| 2124a46 | 1.58 MiB | 2.12 MiB | 551.51 KiB |
| 9fbb112 | 1.58 MiB | 2.11 MiB | 539.18 KiB |
| b6702b0 | 1.58 MiB | 2.12 MiB | 551.79 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| 27d7cf8 | 1.58 MiB | 2.12 MiB | 549.42 KiB |
| 9fbb112 | 1.58 MiB | 2.11 MiB | 539.18 KiB |
| 96449e8 | 1.58 MiB | 2.11 MiB | 539.35 KiB |
Previous results on branch: feat/profiling-remove-vendored-code
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 685ed62 | 317.43 ms | 363.16 ms | 45.74 ms |
| 04a034e | 325.24 ms | 415.40 ms | 90.16 ms |
| c4e9681 | 339.70 ms | 445.26 ms | 105.56 ms |
| 4bbb5eb | 349.94 ms | 442.94 ms | 93.00 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 685ed62 | 1.58 MiB | 2.12 MiB | 551.51 KiB |
| 04a034e | 1.58 MiB | 2.12 MiB | 551.51 KiB |
| c4e9681 | 1.58 MiB | 2.12 MiB | 551.56 KiB |
| 4bbb5eb | 1.58 MiB | 2.12 MiB | 551.57 KiB |
adinauer
approved these changes
Nov 4, 2025
Member
adinauer
left a comment
There was a problem hiding this comment.
Nice! Left some minor comments.
|
|
||
| ### Features | ||
|
|
||
| - Remove vendored code and upgrade to async profiler 4.2 ([#4856](https://github.com/getsentry/sentry-java/pull/4856)) |
Member
There was a problem hiding this comment.
We should mention that this means compatibility with newer JDK versions.
| "start,jfr,event=wall,nobatch,interval=%s,file=%s", | ||
| profilingIntervalMicros, filename); | ||
|
|
||
| logger.log(SentryLevel.INFO, command); |
Member
There was a problem hiding this comment.
Do we want to remove this again? Or lower log level? I imagine it's quite spammy.
Collaborator
Author
There was a problem hiding this comment.
Ah, yes, oversight on my part. Will remove this
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Bug: JFR Reader: Upstream Incompatibility
The code references jfr.javaThreads which was a Sentry-specific modification to the vendored JFR reader but doesn't exist in the upstream one.jfr.JfrReader library. This will cause a compilation error or runtime failure when trying to resolve Java thread IDs from native thread IDs.
sentry-async-profiler/src/main/java/io/sentry/asyncprofiler/convert/JfrAsyncProfilerToSentryProfileConverter.java#L118-L123
# Conflicts: # CHANGELOG.md
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.
📜 Description
Upgrade to async-profiler 4.2. This allows us to remove all vendored code from the converter and also adds support for jdk 23+.
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps