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.
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
Endpoint Telemetry: Agents Metrics + Policy Config / Response #102171
Endpoint Telemetry: Agents Metrics + Policy Config / Response #102171
Changes from 31 commits
1432e1b
4fa12e3
4c75e55
92e8e0d
26420dc
e9a3c4c
9a72714
f2ddc22
5975ed7
7b9d43c
7b6a365
0661f22
a2308c8
699e068
b810618
6932470
05e6f6b
9b4e310
f9b7e92
4ccd4df
1fb9c30
3d7eaa8
841edd6
3d5c511
c590280
c64ea5c
8e54c0d
0781c54
ee38ae7
eb75a93
cbd499d
464db0d
4e5804b
d769be8
d88d151
99ceeef
c4316b0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Would there ever be a case wherein we have a policy failure but no installed endpoints? Would we want to submit a
endpoint-metadata
payload for that day so that we'd knowCluster X has an agent with a failed endpoint install
?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.
It is possible - yeah. The reasoning behind this is that there should be at least one running endpoint agent to consider it a cluster of interest.
However, to capture these both in one scoop that way is algorithmically awkward (what we have now) and the security team are going to have a bad time maintaining / scaling it. The reason for this is that we will have a lot of very nested
if
s and conditional branching which is hard to track. If we want to make sure we always capture these we should split these into 2 separate telemetry docs and send to 2 dedicated channels:Metrics / Policy Document
Policy Repsonse
We could still do it in the one task. This would remove a lot of complexity from the code and be easier to maintain. It will also prevent us from sending the same config / response many times - particularly if a user's fleet is having a bad day. I'm not sure the policy response adds much to the metrics. I think separating is the best course of action. What do you think?
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.
After meditating on this for a while, I think we can do this in a more efficient way - but it's not going to be much better to maintain. I will implement it this afternoon.
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.
Just a personal preference here, but might make it a bit easier to read intent if we store the boolean logic in a variable
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.
Yeah, that is slick. Thanks for the feedback!