-
-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load multiple debug-metadata.properties during runtime #3024
Conversation
# Conflicts: # sentry/src/main/java/io/sentry/internal/debugmeta/ResourcesDebugMetaLoader.java
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b172d4e | 352.92 ms | 446.50 ms | 93.58 ms |
0bd723b | 375.20 ms | 452.41 ms | 77.20 ms |
283d83e | 416.81 ms | 497.22 ms | 80.41 ms |
283d83e | 348.44 ms | 392.06 ms | 43.62 ms |
0bd723b | 395.44 ms | 472.66 ms | 77.22 ms |
4e29063 | 384.14 ms | 447.74 ms | 63.60 ms |
93a76ca | 391.54 ms | 475.65 ms | 84.11 ms |
0bf143e | 368.35 ms | 437.47 ms | 69.12 ms |
4e29063 | 364.08 ms | 445.51 ms | 81.43 ms |
4bf95dd | 345.96 ms | 414.24 ms | 68.28 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b172d4e | 1.72 MiB | 2.29 MiB | 578.09 KiB |
0bd723b | 1.72 MiB | 2.29 MiB | 578.09 KiB |
283d83e | 1.72 MiB | 2.29 MiB | 577.69 KiB |
283d83e | 1.72 MiB | 2.29 MiB | 577.69 KiB |
0bd723b | 1.72 MiB | 2.29 MiB | 578.09 KiB |
4e29063 | 1.72 MiB | 2.29 MiB | 578.38 KiB |
93a76ca | 1.72 MiB | 2.29 MiB | 576.75 KiB |
0bf143e | 1.72 MiB | 2.29 MiB | 576.50 KiB |
4e29063 | 1.72 MiB | 2.29 MiB | 578.38 KiB |
4bf95dd | 1.72 MiB | 2.29 MiB | 576.40 KiB |
Previous results on branch: feat/multiple-debug-meta.properties
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
bb69afa | 420.90 ms | 486.08 ms | 65.18 ms |
b5d05a5 | 368.24 ms | 445.90 ms | 77.66 ms |
b950cf5 | 422.09 ms | 508.16 ms | 86.06 ms |
943fdf8 | 402.53 ms | 480.56 ms | 78.03 ms |
b87b12a | 379.98 ms | 469.46 ms | 89.48 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
bb69afa | 1.72 MiB | 2.29 MiB | 577.37 KiB |
b5d05a5 | 1.72 MiB | 2.27 MiB | 555.00 KiB |
b950cf5 | 1.72 MiB | 2.29 MiB | 577.37 KiB |
943fdf8 | 1.72 MiB | 2.29 MiB | 577.52 KiB |
b87b12a | 1.72 MiB | 2.29 MiB | 577.37 KiB |
Codecov ReportAttention:
📢 Thoughts on this report? Let us know! |
# Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some remarks. Most important is stream handling and exception handling.
sentry/src/main/java/io/sentry/internal/debugmeta/ResourcesDebugMetaLoader.java
Show resolved
Hide resolved
} catch (IOException e) { | ||
logger.log(SentryLevel.ERROR, e, "Failed to load %s", DEBUG_META_PROPERTIES_FILENAME); | ||
} catch (RuntimeException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h
Should we move this into the while
so we keep loading the files that do work?
while (resourceUrls.hasMoreElements()) { | ||
URL currenturl = resourceUrls.nextElement(); | ||
Properties currentProperties = new Properties(); | ||
currentProperties.load(currenturl.openStream()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h
Stream should be closed, e.g. try(...) { ...
final @Nullable String proguardUuid = | ||
debugMetaProperties.getProperty("io.sentry.ProguardUuids"); | ||
debugMetaProperties.get(0).getProperty("io.sentry.ProguardUuids"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m
I presume this is fine as there should never be more than one debug-meta.properties
on Android but I guess it'd be safer to iterate over the list until we find a proguard ID. Would still be first one wins but I guess that's OK, can always improve later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just needs conflicts resolved
# Conflicts: # CHANGELOG.md # sentry/api/sentry.api # sentry/src/main/java/io/sentry/util/DebugMetaPropertiesApplier.java
# Conflicts: # CHANGELOG.md
📜 Description
Load all
debug-metadata.properties
and apply to SentryOptions.Only the first
debug-metadata.properties
is taken into consideration for adding the Proguard UUID💡 Motivation and Context
Fixes #2994
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps