-
Notifications
You must be signed in to change notification settings - Fork 371
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
Adding logging of python version to telemetry and locally #1841
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1841 +/- ##
========================================
Coverage 69.40% 69.40%
========================================
Files 82 82
Lines 11510 11510
Branches 1620 1620
========================================
Hits 7989 7989
Misses 3184 3184
Partials 337 337
Continue to review full report at Codecov.
|
azurelinuxagent/ga/update.py
Outdated
os_info_msg = u"Distro info: {0} {1}, osutil class being used: {2}, agent service name: {3}"\ | ||
.format(DISTRO_NAME, DISTRO_VERSION, type(self.osutil).__name__, self.osutil.service_name) | ||
|
||
os_info_msg = u"Distro info: {0} {1}, osutil class being used: {2}, agent service name: {3}; " \ |
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.
can we give some structure to this info? since json seems to cause problems with telemetry maybe a dict? something that is easy to parse in Kusto.
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.
The message field isn't a JSON due to the telemetry issue parsing JSON - as you pointed out. the current message is parsable but can be improved a little to introduce a structure, which can then be extended in the future if needed.
I'll try to format the message more deterministically to make sure that it is easy to extract fields in our telemetry language.
eg, something like:
Distro: DISTRO_NAME-DISTRO_VERSION; OSUtil: DefaultOSUtil; AgentService: waagent; Python: 3.7.5
Which can be easily parsed.
@larohra - JSON or dict would definitely be ideal
The telemetry pipeline acts weird when sent JSON, and also when sent dict.str() form - eg: the keys are sometimes formatted in Unicode and the parse_json() function in our telemetry fails to parse the dictionary back.
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.
A JSON or dict would definitely be ideal but I'm good with this too. Thanks for adding it :)
Description
Adding logging of python version to telemetry and locally to help analyze the state of the fleet and python version usage.
Issue #
PR information
Quality of Code and Contribution Guidelines
This change is