Skip to content
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

Additional telemetry for goal state #2675

Merged
merged 3 commits into from
Sep 30, 2022
Merged

Conversation

narrieta
Copy link
Member

There are some important messages wrt the Goal State that are written only to the local log. Adding telemetry for those.

@codecov
Copy link

codecov bot commented Sep 30, 2022

Codecov Report

Merging #2675 (8fd1cfc) into release-2.9.0.0 (a65135f) will increase coverage by 0.02%.
The diff coverage is 92.85%.

@@                 Coverage Diff                 @@
##           release-2.9.0.0    #2675      +/-   ##
===================================================
+ Coverage            71.95%   71.98%   +0.02%     
===================================================
  Files                  103      103              
  Lines                15681    15698      +17     
  Branches              2245     2245              
===================================================
+ Hits                 11284    11300      +16     
- Misses                3880     3881       +1     
  Partials               517      517              
Impacted Files Coverage Δ
azurelinuxagent/common/protocol/goal_state.py 94.56% <92.85%> (-0.02%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

if len(certs.warnings) > 0:
self.logger.warn(certs.warnings)
add_event(op=WALAEventOperation.GoalState, message=certs.warnings)
self._history.save_certificates(json.dumps(certs.summary))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it's useful to add?

self.logger.info('Fetch goal state completed')

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left that one out, but I can add it if you think it'd be useful. If the operation fails we would get telemetry for the ProtocolError, otherwise we can assume it completed successfully.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add to avoid assumption. Especially it's useful for on callers or somebody who queries our data without knowing our code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, the telemetry skips successful operations (when possible) and reports only errors, but I'll go ahead and add this one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Since we are adding related information, I thought this would be useful to avoid confusion. Thanks for the change.

if len(certs.warnings) > 0:
self.logger.warn(certs.warnings)
add_event(op=WALAEventOperation.GoalState, message=certs.warnings)
self._history.save_certificates(json.dumps(certs.summary))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Since we are adding related information, I thought this would be useful to avoid confusion. Thanks for the change.

@narrieta narrieta merged commit e7641bd into Azure:release-2.9.0.0 Sep 30, 2022
@narrieta narrieta deleted the telemetry branch September 30, 2022 20:00
narrieta added a commit to narrieta/WALinuxAgent that referenced this pull request Sep 30, 2022
* Additional telemetry for goal state

* add success message

Co-authored-by: narrieta <narrieta>
(cherry picked from commit e7641bd)
narrieta added a commit that referenced this pull request Oct 5, 2022
* Additional telemetry for goal state

* add success message

Co-authored-by: narrieta <narrieta>
(cherry picked from commit e7641bd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants