Track usage, errors, and create disable_telemetry flag#2319
Open
bmehta001 wants to merge 37 commits intomicrosoft:mainfrom
Open
Track usage, errors, and create disable_telemetry flag#2319bmehta001 wants to merge 37 commits intomicrosoft:mainfrom
bmehta001 wants to merge 37 commits intomicrosoft:mainfrom
Conversation
shaahji
requested changes
Feb 8, 2026
Collaborator
There was a problem hiding this comment.
nit: Some of the functions like _build_path, retrieve_id, etc. can be marked as property.
Comment on lines
+85
to
+91
| def item_count(self) -> int: | ||
| """Get the number of items in the current payload.""" | ||
| return len(self.items) | ||
|
|
||
| def is_empty(self) -> bool: | ||
| """Check if the payload is empty.""" | ||
| return len(self.items) == 0 |
Comment on lines
+42
to
+48
| def is_informational_logging_enabled(self) -> bool: | ||
| """Check if informational level logging is enabled.""" | ||
| return self.logger.isEnabledFor(logging.INFO) | ||
|
|
||
| def is_error_logging_enabled(self) -> bool: | ||
| """Check if error level logging is enabled.""" | ||
| return self.logger.isEnabledFor(logging.ERROR) |
| ORT_SUPPORT_DIR = r"Microsoft/DeveloperTools/.onnxruntime" | ||
|
|
||
|
|
||
| def get_telemetry_base_dir() -> Path: |
Collaborator
There was a problem hiding this comment.
Make it a property and also mark it with @functools.lru_cache(maxsize=1)
|
|
||
|
|
||
| def get_telemetry_base_dir() -> Path: | ||
| os_name = platform.system() |
Collaborator
There was a problem hiding this comment.
Worth adding a way for user to override this path with a known/defined environment variable OLIVE_TELEMETRY_CACHE_PATH or something. Permissions might be a problem sometimes in default folders.
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.
Add telemetry library and Olive-specific functionality
--disable-telemetry)Nits:
Description of change for release notes:
Checklist before requesting a review
lintrunner -a