Metrics clean#3403
Merged
Merged
Conversation
- put `toStatsdType` in enum directly - beforeMetric wrapped in try catch - flush check if there are metrics before scheduling again
Contributor
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 |
stefanosiano
marked this pull request as ready for review
May 2, 2024 12:56
markushi
approved these changes
May 3, 2024
| final @NotNull String statsdCode; | ||
|
|
||
| MetricType(final @NotNull String statsdCode) { | ||
| this.statsdCode = statsdCode; |
Member
There was a problem hiding this comment.
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.
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
timestampMsfromLocalMetricsAggregatortoStatsdTypein enum directly💡 Motivation and Context
Just a small cleanup of the metrics code
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps