Add captureProfile method to hub and client#2290
Merged
Merged
Conversation
…lient removed internal captureTransaction(..., ProfilingTraceData) methods from hub and client deprecated public captureTransaction(..., ProfilingTraceData) methods in hub and client
Contributor
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3d89dea | 322.38 ms | 350.82 ms | 28.45 ms |
| 7300956 | 324.20 ms | 353.79 ms | 29.58 ms |
| 4ca1d7b | 331.33 ms | 335.78 ms | 4.45 ms |
| 4dd88fe | 306.88 ms | 391.58 ms | 84.70 ms |
| 7300956 | 337.57 ms | 384.21 ms | 46.64 ms |
| 54cebc8 | 331.12 ms | 385.14 ms | 54.02 ms |
| c5ccd8a | 329.98 ms | 365.52 ms | 35.54 ms |
| 1e4690d | 354.69 ms | 387.88 ms | 33.19 ms |
| d4087ee | 278.00 ms | 313.86 ms | 35.86 ms |
| 4dd88fe | 302.12 ms | 331.17 ms | 29.04 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3d89dea | 1.74 MiB | 2.33 MiB | 604.92 KiB |
| 7300956 | 1.73 MiB | 2.29 MiB | 578.69 KiB |
| 4ca1d7b | 1.73 MiB | 2.29 MiB | 579.88 KiB |
| 4dd88fe | 1.73 MiB | 2.29 MiB | 579.50 KiB |
| 7300956 | 1.73 MiB | 2.29 MiB | 578.69 KiB |
| 54cebc8 | 1.73 MiB | 2.29 MiB | 579.43 KiB |
| c5ccd8a | 1.74 MiB | 2.33 MiB | 607.44 KiB |
| 1e4690d | 1.74 MiB | 2.33 MiB | 604.92 KiB |
| d4087ee | 1.73 MiB | 2.29 MiB | 579.50 KiB |
| 4dd88fe | 1.73 MiB | 2.29 MiB | 579.50 KiB |
Previous results on branch: feat/hub-capture-profile
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 485764c | 292.65 ms | 384.36 ms | 91.71 ms |
| 3fe771f | 313.41 ms | 356.24 ms | 42.83 ms |
| 77ab44a | 295.33 ms | 331.33 ms | 36.01 ms |
| 56b8edf | 329.37 ms | 369.98 ms | 40.61 ms |
| abd3232 | 364.24 ms | 375.19 ms | 10.94 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 485764c | 1.73 MiB | 2.29 MiB | 580.01 KiB |
| 3fe771f | 1.73 MiB | 2.29 MiB | 580.00 KiB |
| 77ab44a | 1.73 MiB | 2.29 MiB | 580.00 KiB |
| 56b8edf | 1.73 MiB | 2.29 MiB | 580.00 KiB |
| abd3232 | 1.73 MiB | 2.29 MiB | 580.01 KiB |
stefanosiano
marked this pull request as ready for review
October 11, 2022 16:29
philipphofmann
approved these changes
Oct 12, 2022
philipphofmann
left a comment
Member
There was a problem hiding this comment.
Just some comments about the tests, apart from that LGTM
Codecov ReportBase: 80.11% // Head: 79.96% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2290 +/- ##
============================================
- Coverage 80.11% 79.96% -0.16%
+ Complexity 3426 3425 -1
============================================
Files 242 242
Lines 12696 12734 +38
Branches 1698 1702 +4
============================================
+ Hits 10172 10183 +11
- Misses 1881 1901 +20
- Partials 643 650 +7
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. |
…eat/hub-capture-profile
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
I added the method
captureProfiletoIHubandISentryClient, so the profiles can be sent in separate envelopes instead of being attached to transactions.Since the methods that send transaction and profile together were already exposed e.g. in
HubAdapterorSentryClient, they were deprecated to avoid breaking changes.💡 Motivation and Context
We want to separate Profiling and Performance.
The first step to do so is to send separate envelopes for them.
This will also allows to send timed out profiles without waiting for a transaction to be attached to (more on this on another pr)
💚 How did you test it?
I added few unit tests for the new methods and added one to check the deprecated method calls the new ones.
📝 Checklist
🔮 Next steps
The profiler will send the profile envelope by itself, instead of relying on
SentryTracer, but will be done in another pr