Skip to content

[py] Add increment/decrement methods to AgentCheck#297

Merged
masci merged 2 commits intomasterfrom
olivielpeau/support-increment-decrement
Jun 15, 2017
Merged

[py] Add increment/decrement methods to AgentCheck#297
masci merged 2 commits intomasterfrom
olivielpeau/support-increment-decrement

Conversation

@olivielpeau
Copy link
Copy Markdown
Member

@olivielpeau olivielpeau commented Jun 13, 2017

What does this PR do?

Adds increment/decrement methods to AgentCheck. The methods use count after 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 count submits metrics with the COUNT api metric type, whereas in agent 5 increment/decrement 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).

Currently syncing with the agent-intake/query teams to determine if, in the agent 5, we could start sending the increment/decrement metrics 2 times: once as-is and once with the suffix and the COUNT type. This could ease the transition to the new metric name on the customers' side.

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).
Copy link
Copy Markdown
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

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

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.
@olivielpeau
Copy link
Copy Markdown
Member Author

@masci good point, thanks! I've added a warning, let me know what you think

@masci
Copy link
Copy Markdown
Contributor

masci commented Jun 15, 2017

🍰 !

@masci masci merged commit 0928360 into master Jun 15, 2017
@masci masci deleted the olivielpeau/support-increment-decrement branch June 15, 2017 08:40
s-alad added a commit that referenced this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants