-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Move the dispatch of gauge metric calls to its dedicated thread asynchronously #7601
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
Conversation
Coverage ReportAffected SDKs
Test Logs
|
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, one question.
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 with resolution of @maksymmalyhin's question
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.
Thank you for the update! LGTM on CI green.
| [self prepareAndDispatchGaugeData]; | ||
| }); | ||
| // Dispatch the already available gauge data with old sessionId. | ||
| [self prepareAndDispatchCollectedGaugeDataWithSessionId:self.currentSessionId]; |
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.
May it happen that the new session gauge data will be associated with the old session ID? Looks like not, because addGaugeData is also protected by the serial queue. But would like to check with you just in case.
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.
That is a good question as well. I thought about as well, a lot in detail. The ideal solution I had in my mind was to make the prepareAndDispatch method to take both the gauge data and the session ID as inputs (making it more self-contained). But that lead to a lot of repetitive code in reseting the gauge data unprotected. So took this approach which has the risk you mentioned, but since both addGaugeData and prepareAndDispatch happen on the same serial queue, that issue would not happen.
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! This PR has been a great learning experience for me!
Fixes #7535