[py] Add increment/decrement methods to AgentCheck#297
Merged
Conversation
Eases the transition from agent 5 to agent 6 for the checks. The methods use `count` after adding a suffix to the metric name. The suffix is required because `count` submits metrics with the `COUNT` api metric type, whereas in agent 5 these methods use the `RATE` api metric type, so we need to use a different metric name (the backend doesn't support using a different API metric type for the same metric name).
masci
approved these changes
Jun 14, 2017
Contributor
masci
left a comment
There was a problem hiding this comment.
LGTM!
Do you think we should log a deprecation warning when these methods are used?
Logged at most once per check to avoid spamming the logs.
Member
Author
|
@masci good point, thanks! I've added a warning, let me know what you think |
Contributor
|
🍰 ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Adds
increment/decrementmethods toAgentCheck. The methods usecountafter adding a suffix to the metric name.Motivation
Eases the transition from agent 5 to agent 6 for the checks.
Additional Notes
The suffix is required because
countsubmits metrics with theCOUNTapi metric type, whereas in agent 5increment/decrementuse theRATEapi metric type, so we need to use a different metric name (the backend doesn't support using a different API metric type for the same metric name).Currently syncing with the agent-intake/query teams to determine if, in the agent 5, we could start sending the
increment/decrementmetrics 2 times: once as-is and once with the suffix and theCOUNTtype. This could ease the transition to the new metric name on the customers' side.