AGD-2857 : cache adp analytics optin#13678
Merged
BogdanZavu merged 2 commits intoDynamoDS:masterfrom Jan 17, 2023
Merged
Conversation
mjkkirschner
approved these changes
Jan 13, 2023
Member
mjkkirschner
left a comment
There was a problem hiding this comment.
I'm fine with this if the potential for missing analytics is acceptable to @QilongTang.
I guess a future improvement could be update this cached value at some interval or in the background/from another thread.
pinzart90
reviewed
Jan 13, 2023
| { | ||
| get { return Logging.AnalyticsService.IsADPOptedIn; } | ||
| get | ||
| { |
Contributor
There was a problem hiding this comment.
pls add some comments here as to why we are only checking a single time.
QilongTang
approved these changes
Jan 17, 2023
BogdanZavu
added a commit
to BogdanZavu/Dynamo
that referenced
this pull request
Jan 17, 2023
* cache adp analytics optin * add comment Co-authored-by: Bogdan Zavu <[email protected]>
QilongTang
pushed a commit
that referenced
this pull request
Jan 18, 2023
* cache adp analytics optin * add comment Co-authored-by: Bogdan Zavu <[email protected]> Co-authored-by: Bogdan Zavu <[email protected]>
twastvedt
pushed a commit
that referenced
this pull request
Oct 18, 2024
* cache adp analytics optin * add comment Co-authored-by: Bogdan Zavu <[email protected]> Co-authored-by: Bogdan Zavu <[email protected]> (cherry picked from commit 806231e) # Conflicts: # src/DynamoCore/Configuration/PreferenceSettings.cs
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.
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