[Core] Drop client telemetry cache strategy#26854
Merged
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Collaborator
|
Core |
calvinhzy
approved these changes
Jul 20, 2023
Member
|
The removal of telemetry cache makes it difficult to locally verify the sent telemetry record, such as #26980, making the testing guide from #24304 (comment) not applicable anymore. |
3 tasks
Member
|
Sending client telemetry in each command slows down the command execution. Without telemetry, on Windows, > az config set core.collect_telemetry=false
> (Measure-Command {az version}).TotalMilliseconds
629.2332But with telemetry, it becomes ~800ms, with an increase of 33%: > az config set core.collect_telemetry=true
> (Measure-Command {az version}).TotalMilliseconds
822.9069The execution time increase on Linux is more outstanding - 50% increase. $ az config set core.collect_telemetry=false
$ time az version > /dev/null
real 0m0.230s
$ az config set core.collect_telemetry=true
$ time az version > /dev/null
real 0m0.323s |
Member
Author
|
But CLI telemetry is sent in separate process: It should not lower the CLI command's execution time |
avgale
pushed a commit
to avgale/azure-cli
that referenced
this pull request
Aug 24, 2023
* drop client telemetry push interval * upgrade telemetry version * remove unused import
jiasli
reviewed
May 13, 2024
| return False | ||
|
|
||
| modify_time = datetime.fromtimestamp(file_stat.st_mtime) | ||
| if datetime.now() - modify_time < MANDATORY_WAIT_PERIOD: |
Member
There was a problem hiding this comment.
On a second thought, would it be safer to keep the existing code and let MANDATORY_WAIT_PERIOD = 0 in order to make the wait period configurable?
3 tasks
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
We have reduce client telemetry push interval from 24h to 6h in #26065, from 6h to 1h in #26509
Now it's time to fully drop client telemetry cache strategy. All telemetry records will be uploaded immediately.
Testing Guide
Run any cli command and check if there's
$HOME_DIR/.azure/telemetry/cachefile anymoreThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.