[agent_metrics] add metrics for num_metrics and num_events - #2899
[agent_metrics] add metrics for num_metrics and num_events#2899cberry777 wants to merge 2 commits into
Conversation
|
Thanks @cberry777
However, it might be useful to track that so we'll get it merged for our 5.11 release. Can you have a look at the failing tests please ? |
|
Again. Tests are failing that have nothing to do with this code. All tests pass when I run "rake" Ran 176 tests in 20.422s OK (SKIP=1) |
|
Is there a way to "re-fire" the test suite?? |
|
It was a flaky test, all green now. |
|
Hey @cberry777! Thanks a lot for your contribution. I think I missed this one when we went through our SDK move. This should be moved to our Integrations Core repo and closed here. I looked it over and don't see anything standout that needs to be changed. If you move it I see no reason it couldn't be merged easily! |
What does this PR do?
Adds additional metrics for num_metrics and num_events to agent_metrics
Motivation
It is very important to monitor the number of metrics and events emitted from each agent. It allows us to 1) keep track of the total number of metrics sent to Datadog (to monitor billing), and 2) locate rogue agents emitting above some threshold.
Testing Guidelines
A test is provided: /tests/checks/mock/test_agent_metrics.py (# test_num_metrics)
Additional Notes
An optional switch is provided (in the init_config) that allows one to log the number of metrics and events for each collection run.