-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add decorator for tracking execution statistics of check methods #10809
Conversation
Adds a new decorator `dbm_tracked_method` to be used for tracking the performance of methods in a standardized way. This will significantly reduce measurement boilerplate across the DBM integrations and make the measurements less error prone. It's important to track the performance and error rates of various parts of the DBM integrations in order to better troubleshoot customer issues. We already have a bunch of internal debug metrics tracking the execution time and error rate of various operations in DBM. For example, `dd.postgres.collect_statement_samples.time` tracks the execution time of the `_collect_statement_samples` method for postgres. All of these manual measurements will be updated to use this new measurement decorator instead.
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
Update all internal method invocation debug instrumentation to use new decorator added in #10809
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 looks interesting! I have a few suggestions ; did you manage to measure the overhead of this decorator?
874d4bf
to
e2c6696
Compare
Addressed all of your comments. I didn't measure the overhead. statsd is very low overhead generally and in this case the metrics are being aggregated directly in the agent via the internal API so it should be even lower overhead than typical statsd sent over the network. |
Update all internal method invocation debug instrumentation to use new decorator added in #10809
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.
👍 if CI is green
Just please edit the title to be more descriptive |
Update all internal method invocation debug instrumentation to use new decorator added in #10809
* improve internal check execution instrumentation Update all internal method invocation debug instrumentation to use new decorator added in #10809 * revert typo * fix for py2 * use new base version
) * dbm add tracked method decorator Adds a new decorator `dbm_tracked_method` to be used for tracking the performance of methods in a standardized way. This will significantly reduce measurement boilerplate across the DBM integrations and make the measurements less error prone. It's important to track the performance and error rates of various parts of the DBM integrations in order to better troubleshoot customer issues. We already have a bunch of internal debug metrics tracking the execution time and error rate of various operations in DBM. For example, `dd.postgres.collect_statement_samples.time` tracks the execution time of the `_collect_statement_samples` method for postgres. All of these manual measurements will be updated to use this new measurement decorator instead. * move to new tracking module * revert * add option to disable * standardize naming * logging fix * style * fix py2
* improve internal check execution instrumentation Update all internal method invocation debug instrumentation to use new decorator added in #10809 * revert typo * fix for py2 * use new base version
What does this PR do?
Adds a new decorator
tracked_method
to be used for tracking the performance of methods in a standardized way. This will significantly reduce measurement boilerplate across the DBM integrations and make the measurements less error prone. It's important to track the performance and error rates of various parts of the DBM integrations in order to better troubleshoot customer issues.We already have a bunch of internal debug metrics tracking the execution time and error rate of various operations in DBM. For example,
dd.postgres.collect_statement_samples.time
tracks the execution time of the_collect_statement_samples
method for postgres. All of these manual measurements will be updated to use this new measurement decorator instead.Motivation
Reduce boilerplate and make debugging performance measurements more standardized and less error prone.
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached