Move onFinishCallback before span or transaction is finished#3459
Merged
Conversation
stefanosiano
commented
Jun 5, 2024
| transactionOptions.getTransactionFinishedCallback(); | ||
| if (finishedCallback != null) { | ||
| finishedCallback.execute(this); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
I moved the performanceCollectors here, to fix an issue with SpanFrameMetricsCollection which was not setting the frame counts measurements, due to transaction being already finished
stefanosiano
marked this pull request as ready for review
June 5, 2024 10:11
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d6d2b2e | 463.14 ms | 545.56 ms | 82.42 ms |
| a3c77bc | 375.80 ms | 445.85 ms | 70.06 ms |
| c7e2fbc | 377.85 ms | 426.35 ms | 48.50 ms |
| f5e1b97 | 362.53 ms | 429.31 ms | 66.78 ms |
| 7eccfdb | 389.94 ms | 461.29 ms | 71.35 ms |
| f1fdb9f | 404.21 ms | 496.87 ms | 92.66 ms |
| 28c9a83 | 346.14 ms | 377.76 ms | 31.62 ms |
| baaf637 | 375.71 ms | 441.58 ms | 65.87 ms |
| 283d83e | 348.44 ms | 392.06 ms | 43.62 ms |
| 61981dc | 388.65 ms | 454.96 ms | 66.31 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d6d2b2e | 1.72 MiB | 2.27 MiB | 555.05 KiB |
| a3c77bc | 1.72 MiB | 2.29 MiB | 577.53 KiB |
| c7e2fbc | 1.72 MiB | 2.29 MiB | 576.40 KiB |
| f5e1b97 | 1.70 MiB | 2.28 MiB | 592.00 KiB |
| 7eccfdb | 1.72 MiB | 2.27 MiB | 556.93 KiB |
| f1fdb9f | 1.70 MiB | 2.28 MiB | 592.08 KiB |
| 28c9a83 | 1.70 MiB | 2.28 MiB | 592.00 KiB |
| baaf637 | 1.72 MiB | 2.27 MiB | 558.42 KiB |
| 283d83e | 1.72 MiB | 2.29 MiB | 577.69 KiB |
| 61981dc | 1.70 MiB | 2.28 MiB | 592.12 KiB |
…rame measurements not being set
markushi
approved these changes
Jun 17, 2024
| private final @NotNull IHub hub; | ||
|
|
||
| private final @NotNull AtomicBoolean finished = new AtomicBoolean(false); | ||
| private boolean finished = false; |
Member
There was a problem hiding this comment.
nit this probably should be volatile, but then on the other hand we also don't do this for other span properties ¯_(ツ)_/¯
Contributor
Author
There was a problem hiding this comment.
let's keep AtomicBoolean and change it later if ever needed, as i don't think it really changes anything
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
moved span and transaction finish callback before they are actually finished
💡 Motivation and Context
Closes #3228
This fixes and aligns the behaviour among spans and transactions.
💚 How did you test it?
Unit tests
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps