-
-
Notifications
You must be signed in to change notification settings - Fork 441
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
Metrics clean #3403
Metrics clean #3403
Conversation
- put `toStatsdType` in enum directly - beforeMetric wrapped in try catch - flush check if there are metrics before scheduling again
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
0810952 | 364.51 ms | 468.08 ms | 103.57 ms |
61981dc | 388.65 ms | 454.96 ms | 66.31 ms |
baaf637 | 428.12 ms | 520.40 ms | 92.28 ms |
1ae2ec6 | 353.85 ms | 419.71 ms | 65.85 ms |
c7e2fbc | 377.85 ms | 426.35 ms | 48.50 ms |
b172d4e | 412.60 ms | 492.68 ms | 80.08 ms |
4e260b3 | 378.73 ms | 454.18 ms | 75.45 ms |
93a76ca | 377.41 ms | 448.22 ms | 70.81 ms |
93a76ca | 381.08 ms | 459.22 ms | 78.14 ms |
7b7964f | 363.27 ms | 455.32 ms | 92.05 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
0810952 | 1.72 MiB | 2.27 MiB | 558.21 KiB |
61981dc | 1.70 MiB | 2.28 MiB | 592.12 KiB |
baaf637 | 1.72 MiB | 2.27 MiB | 558.42 KiB |
1ae2ec6 | 1.70 MiB | 2.27 MiB | 584.63 KiB |
c7e2fbc | 1.72 MiB | 2.29 MiB | 576.40 KiB |
b172d4e | 1.72 MiB | 2.29 MiB | 578.09 KiB |
4e260b3 | 1.72 MiB | 2.27 MiB | 554.95 KiB |
93a76ca | 1.72 MiB | 2.29 MiB | 576.75 KiB |
93a76ca | 1.72 MiB | 2.29 MiB | 576.75 KiB |
7b7964f | 1.70 MiB | 2.28 MiB | 592.12 KiB |
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, very nice!
final @NotNull String statsdCode; | ||
|
||
MetricType(final @NotNull String statsdCode) { | ||
this.statsdCode = statsdCode; |
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.
nit
: I separated MetricType
from Statsd on purpose: If we ever decide to use a different protocol, we would only need to refactor some helpers and transport specific code. But I'm still fine with doing it this way, as that's what other SDKs are doing as well.
📜 Description
timestampMs
fromLocalMetricsAggregator
toStatsdType
in enum directly💡 Motivation and Context
Just a small cleanup of the metrics code
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps