-
Notifications
You must be signed in to change notification settings - Fork 9
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
Collect agent info from sidecar #701
Conversation
ef4bc6b
to
8c62f6a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #701 +/- ##
==========================================
- Coverage 70.64% 70.60% -0.04%
==========================================
Files 280 281 +1
Lines 41805 41980 +175
==========================================
+ Hits 29532 29642 +110
- Misses 12273 12338 +65
|
BenchmarksComparisonBenchmark execution time: 2024-11-05 12:07:19 Comparing candidate commit da154f2 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 51 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
BaselineOmitted due to size. |
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.
Please add comments and tests.
infos: Shared<ManualFuture<AgentInfoStruct>>, | ||
} | ||
|
||
impl AgentInfoFetcher { |
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.
This file has no comments or tests 😞 I also find it confusing that this has the same name AgentInfoFetcher
as the AgentInfoFetcher
in data-pipeline
. Yes, I know that there are differences, but couldn't the break
check, and the processing be moved behind a trait
and there only be one impl of the loop?
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.
I wasn't intentionally choosing the same name. Maybe I can call it AgentInfoWriter, but not sure if that helps?
You theoretically could do it, but the actual amount of shared code would be quite low & the boilerplate for the sharing of code quite large in comparison? I feel like fetch_info_with_state is the right level of abstraction for this.
I can though add at least a test for the happy path here.
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.
Fine, let's not try to share more code then.
Please add a happy path test and some comments. I mean at least something like:
//! This file contains code for fetching and sharing the info from the Datadog Agent
//! ... etc
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.
Yes, I will do, just haven't gotten round to it yet.
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.
@bantonsson Done :-)
73e5f69
to
fe3c47e
Compare
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
fe3c47e
to
da154f2
Compare
* Collect agent info from sidecar Signed-off-by: Bob Weinand <[email protected]> * Add comments and test for AgentInfo in sidecar Signed-off-by: Bob Weinand <[email protected]> --------- Signed-off-by: Bob Weinand <[email protected]>
The tracer needs to know about the env default (to properly apply it).
This PR provides the ability to store the agent info in shared memory (polling every 60 sec).