-
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 prepared_stmt_count metrics to mysql integration #11155
Conversation
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.
Hey @kei6u thanks for the PR!
Overall, this looks good to me but I left a few suggested changes. I believe the metrics should be GAUGEs because they reflect the current state at the time of capture according to the documentation, but let me know if there was a reason you went with COUNTs. Thanks!
@justiniso
I set it as COUNT by getting from the name of metric(prepared stmt "count") since I actually was not sure how to decide a metric type. Now, I understand why I should've set it as GAUGEs. |
Co-authored-by: Justin <[email protected]>
Co-authored-by: Justin <[email protected]>
Co-authored-by: Justin <[email protected]>
Co-authored-by: Justin <[email protected]>
41f7677
to
42bf02b
Compare
Thanks @kei6u, I went ahead and merged this. You can expect it to go out in agent version 7.35.0. |
What does this PR do?
Add following metrics:
mysql.performance.prepared_stmt_count
mysql.performance.max_prepared_stmt_count
Motivation
mysql.performance.prepared_stmt_count
is to get the current number of prepared statements.https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Prepared_stmt_count
mysql.performance.prepared_stmt_count
is to get the total number of prepared statements in the server.https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_max_prepared_stmt_count
Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached