-
Notifications
You must be signed in to change notification settings - Fork 372
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
Start sending Execution Mode in the Telemetry #1657
Start sending Execution Mode in the Telemetry #1657
Conversation
azurelinuxagent/ga/monitor.py
Outdated
copy_param = [] | ||
|
||
for param in event.parameters: | ||
if param.name in sysinfo_names: | ||
logger.verbose("Remove existing event parameter: [{0}:{1}]", param.name, param.value) | ||
event.parameters.remove(param) | ||
event.parameters.extend(self.sysinfo) | ||
if param.name not in sysinfo_names: | ||
logger.verbose("Adding existing event parameter: [{0}:{1}]", param.name, param.value) | ||
copy_param.append(param) | ||
else: | ||
logger.verbose("Removing existing event parameter: [{0}:{1}]", param.name, param.value) | ||
|
||
copy_param.extend(self.sysinfo) | ||
event.parameters = copy_param | ||
|
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 earlier logic doesn't cleanly remove items from the list. When the fields to be removed come next to each other in the list, the list.remove would stip the second occurrence of the item to be removed.
Codecov Report
@@ Coverage Diff @@
## develop #1657 +/- ##
===========================================
+ Coverage 66.92% 67.14% +0.21%
===========================================
Files 78 78
Lines 11263 11266 +3
Branches 1575 1575
===========================================
+ Hits 7538 7564 +26
+ Misses 3402 3379 -23
Partials 323 323
Continue to review full report at Codecov.
|
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.
LGTM
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.
Minor comments, else LGTM.
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.
minor comments
Description
Sending
ExecutionMode
field when sending telemetry events.PR information
Quality of Code and Contribution Guidelines
This change is