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

Fetch goal state before sending telemetry #1751

Merged
merged 2 commits into from
Jan 13, 2020

Conversation

narrieta
Copy link
Member

@narrieta narrieta commented Jan 10, 2020

Some of the code that emits telemetry is relying on something else initializing the container ID (which comes from the goal state).

I made an explicit call to fetch the goal state in the extension handler.

For the daemon, provisioning must be completed before being able to fetch the goal state, so I moved some initialization code (whose telemetry we are interested in) after provisioning. As a result of this, resource usage would not be monitored/enforced for provisioning on non-systemd distros, but I think that is OK (in fact, I am considering whether enforcement should include provisioning on systemd distros).

There is still one telemetry event without a container ID. It is emitted at the end of provisioning; I am hesitant to touch that code at this point so I will leave it alone for now.

I verified this change using the telemetry emitted by DCR.


This change is Reviewable

@codecov
Copy link

codecov bot commented Jan 10, 2020

Codecov Report

❗ No coverage uploaded for pull request base (develop@5b60264). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #1751   +/-   ##
==========================================
  Coverage           ?   68.57%           
==========================================
  Files              ?       82           
  Lines              ?    11741           
  Branches           ?     1646           
==========================================
  Hits               ?     8051           
  Misses             ?     3346           
  Partials           ?      344
Impacted Files Coverage Δ
azurelinuxagent/ga/update.py 88.46% <100%> (ø)
azurelinuxagent/daemon/main.py 73.68% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b60264...9d6e574. Read the comment docs.

Copy link
Contributor

@larohra larohra left a comment

Choose a reason for hiding this comment

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

LGTM

@narrieta narrieta merged commit fbcbab7 into Azure:develop Jan 13, 2020
@narrieta narrieta deleted the telemetry-goal-state branch January 13, 2020 18:26
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.

3 participants