AGD-2857 : cache adp analytics optin #13678
Merged
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.
Purpose
Avoid hang or long startup times when there are issues with ADP connection.
The number of retries in Analytics.NET IsOptedIn. is too high and it takes a failed call 30s to conclude.
In my case the return code was 11 but there could be other codes as well.
On Dynamo startup there is a high number of track event calls which can easily add up to a lot of time.
I believe this is the reason for other reports that we have with Dynamo or Player starting slowly when startup sequence takes too long.
Imho one quick possible solution for this release R2024 is to interrogate once per session for IsOptedIn value and cache it. Also limit the number of retries and overall isOpt check should not tale longer than 3s or other value.
While this will prevent the analytics behavior to be changed during the same session I think we can live with that.
This is somewhat already happening when you are set to false since trackers are only registered on startup if set to true.
Declarations
Check these if you believe they are true
*.resxfilesFYIs