-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Provide API for attaching custom measurements to transactions #2260
Conversation
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1e4690d | 354.69 ms | 387.88 ms | 33.19 ms |
3d89dea | 345.59 ms | 364.06 ms | 18.47 ms |
7300956 | 324.20 ms | 353.79 ms | 29.58 ms |
c5ccd8a | 329.98 ms | 365.52 ms | 35.54 ms |
3d89dea | 322.38 ms | 350.82 ms | 28.45 ms |
7300956 | 337.57 ms | 384.21 ms | 46.64 ms |
2f079a1 | 296.91 ms | 337.43 ms | 40.51 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1e4690d | 1.74 MiB | 2.33 MiB | 604.92 KiB |
3d89dea | 1.74 MiB | 2.33 MiB | 604.92 KiB |
7300956 | 1.73 MiB | 2.29 MiB | 578.69 KiB |
c5ccd8a | 1.74 MiB | 2.33 MiB | 607.44 KiB |
3d89dea | 1.74 MiB | 2.33 MiB | 604.92 KiB |
7300956 | 1.73 MiB | 2.29 MiB | 578.69 KiB |
2f079a1 | 1.74 MiB | 2.33 MiB | 605.56 KiB |
Previous results on branch: feat/custom-measurements
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
2a895ac | 314.41 ms | 356.27 ms | 41.86 ms |
6f273ba | 317.75 ms | 323.18 ms | 5.43 ms |
1554df9 | 319.72 ms | 410.52 ms | 90.80 ms |
c55413e | 296.53 ms | 329.29 ms | 32.76 ms |
aa54cc6 | 353.30 ms | 366.80 ms | 13.50 ms |
7b304b0 | 261.60 ms | 314.70 ms | 53.10 ms |
cb34c81 | 329.60 ms | 335.20 ms | 5.60 ms |
246d07b | 297.00 ms | 333.06 ms | 36.06 ms |
2fda34d | 290.53 ms | 341.90 ms | 51.37 ms |
1a7023b | 378.96 ms | 417.00 ms | 38.04 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
2a895ac | 1.74 MiB | 2.33 MiB | 608.07 KiB |
6f273ba | 1.73 MiB | 2.29 MiB | 579.42 KiB |
1554df9 | 1.73 MiB | 2.29 MiB | 579.18 KiB |
c55413e | 1.74 MiB | 2.33 MiB | 608.07 KiB |
aa54cc6 | 1.73 MiB | 2.29 MiB | 579.42 KiB |
7b304b0 | 1.73 MiB | 2.29 MiB | 579.43 KiB |
cb34c81 | 1.74 MiB | 2.33 MiB | 608.07 KiB |
246d07b | 1.74 MiB | 2.33 MiB | 608.06 KiB |
2fda34d | 1.74 MiB | 2.33 MiB | 608.07 KiB |
1a7023b | 1.74 MiB | 2.33 MiB | 608.06 KiB |
Codecov ReportBase: 80.07% // Head: 80.10% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2260 +/- ##
============================================
+ Coverage 80.07% 80.10% +0.03%
- Complexity 3415 3423 +8
============================================
Files 241 242 +1
Lines 12636 12692 +56
Branches 1697 1698 +1
============================================
+ Hits 10118 10167 +49
- Misses 1876 1882 +6
- Partials 642 643 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Mostly LGTM. Need to decide whether to set NONE
as default in the SDK or not. If not there's some changes required.
btw, I feel like we should change
which in turn, would be displayed like this in the Sentry UI: and I think it doesn't look nice. Worth noting, that if we don't send any units at all, then the frontend does not format it, and it just looks fine: |
Sounds good 👍 |
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.
One important question about the API.
it's a |
PERCENT; | ||
} | ||
|
||
final class Custom implements SentryMeasurementUnit { |
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.
I'm not entirely sure about this, would require creating a new class instance for every custom unit. If it was Kotlin, I'd have used inline classes, problem solved.
In theory we could provide one more setMeasurement
overload which accepts a plain String, but also not sure if it's better.
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.
I'd keep it as it is, Relay does the same.
Some languages don't have overloads, so at least we keep it unified.
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.
I'm also fine with this API. I think we should add some code comments, please.
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.
what kind of comments would you like to add? There's a link to the develop docs explaining every unit though
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.
I've added some comments, mainly deriving from the Relay docs, lemme know if that works.
@adinauer @philipphofmann @marandaneto ready for review once again |
@vaind looks like I made app with sentry start up faster than without sentry 🤣 |
🥇 I should probably make it re-run the whole suite in this case. |
sentry-android-core/src/main/java/io/sentry/android/core/ActivityFramesTracker.java
Outdated
Show resolved
Hide resolved
Feature-wise all good. |
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.
Almost LGTM.
PERCENT; | ||
} | ||
|
||
final class Custom implements SentryMeasurementUnit { |
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.
I'm also fine with this API. I think we should add some code comments, please.
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.
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 two more questions around NONE
and marking as internal.
Thanks everyone for the reviews and opinions 🎉 |
📜 Description
Add API for setting custom measurements.
💡 Motivation and Context
getsentry/team-mobile#51
Closes #2143
💚 How did you test it?
📝 Checklist
🔮 Next steps