Skip to content

Conversation

@evkuzin
Copy link

@evkuzin evkuzin commented Aug 6, 2025

This related to #5068

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @evkuzin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

I've implemented changes to enhance the Prometheus metrics by introducing a 'protocol' label for shared connection and access denial metrics across both MySQL and PostgreSQL host group managers. This will provide clearer differentiation and filtering capabilities for monitoring data. Additionally, I've adjusted the required OpenSSL version in the build system.

Highlights

  • Enhanced Prometheus Metric Labeling: I've added a new 'protocol' label to various Prometheus metrics within both the MySQL and PostgreSQL host group managers. This label will clearly distinguish metrics originating from MySQL connections (labeled 'mysql') versus PostgreSQL connections (labeled 'pgsql'), allowing for more granular monitoring and analysis.
  • OpenSSL Version Downgrade: I've updated the required OpenSSL version in the build configuration from 3.0.0 to 1.1.0.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@evkuzin evkuzin force-pushed the v3.0-fix-prometheus-metrics-dumplication branch from c4ee88e to 13ded1d Compare August 6, 2025 10:55
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a protocol label to shared Prometheus metrics for both MySQL and PostgreSQL, which will help differentiate them in monitoring dashboards. It also downgrades the required OpenSSL version from 3.0.0 to 1.1.0.

The changes to add the protocol label in MySQL_HostGroups_Manager.cpp and PgSQL_HostGroups_Manager.cpp are correct and consistent.

However, there is a critical issue in common_mk/openssl_version_check.mk. While the REQUIRED_OPENSSL_VERSION is updated, the script that checks the version when a custom OpenSSL path is provided still contains hardcoded values for version 3.0.0. This will cause build failures and needs to be corrected.

@renecannao
Copy link
Contributor

Can one of the admins verify this patch?

@evkuzin
Copy link
Author

evkuzin commented Aug 6, 2025

Thank you @gemini-code-assist
Please catchup with the changes. I dropped REQUIRED_OPENSSL_VERSION. This was my dummy change which wasnt suppose to end up in the commit.

@gemini-code-assist
Copy link

Thank you for the update, @evkuzin. I will review the latest changes to the pull request.

@evkuzin evkuzin changed the title add protolol labels for shared metrics between mysql and psql add protocol labels for shared metrics between mysql and psql Aug 7, 2025
@evkuzin
Copy link
Author

evkuzin commented Aug 7, 2025

@rahim-kanji could you take a look please? I think you pushed these postgres metrics, you should know the best.

@renecannao
Copy link
Contributor

add to whitelist

@renecannao
Copy link
Contributor

hi @evkuzin . Thank you for your interest and for the PR !
We will review it.

Note: the previous message (#5069 (comment)) is to allow your PRs to run on our CI.

Thanks!

@evkuzin evkuzin force-pushed the v3.0-fix-prometheus-metrics-dumplication branch from 13ded1d to 2b44aaa Compare August 8, 2025 10:10
@evkuzin
Copy link
Author

evkuzin commented Aug 8, 2025

a sample output

curl localhost:6070/metrics -s | grep protocol
proxysql_server_connections_total{protocol="pgsql",status="delayed"} 0
proxysql_server_connections_total{protocol="pgsql",status="aborted"} 0
proxysql_server_connections_total{protocol="pgsql",status="created"} 0
proxysql_server_connections_total{protocol="mysql",status="delayed"} 0
proxysql_server_connections_total{protocol="mysql",status="aborted"} 0
proxysql_server_connections_total{protocol="mysql",status="created"} 0
proxysql_client_connections_total{protocol="pgsql",status="aborted"} 0
proxysql_client_connections_total{protocol="pgsql",status="created"} 0
proxysql_client_connections_total{protocol="mysql",status="aborted"} 0
proxysql_client_connections_total{protocol="mysql",status="created"} 0
proxysql_access_denied_wrong_password_total{protocol="pgsql"} 0
proxysql_access_denied_wrong_password_total{protocol="mysql"} 0
proxysql_access_denied_max_connections_total{protocol="pgsql"} 0
proxysql_access_denied_max_connections_total{protocol="mysql"} 0
proxysql_access_denied_max_user_connections_total{protocol="pgsql"} 0
proxysql_access_denied_max_user_connections_total{protocol="mysql"} 0
proxysql_server_connections_connected{protocol="pgsql"} 0
proxysql_server_connections_connected{protocol="mysql"} 0
proxysql_client_connections_connected{protocol="pgsql"} 0
proxysql_client_connections_connected{protocol="mysql"} 0

@evkuzin evkuzin force-pushed the v3.0-fix-prometheus-metrics-dumplication branch from fb4975c to 949eda1 Compare August 11, 2025 14:42
@sonarqubecloud
Copy link

@evkuzin
Copy link
Author

evkuzin commented Aug 12, 2025

Turns out PG metrics were also not generated at all so I had to add this call as well. But its now running in my lab snd showing real numbers.
Looking forward for someone to review it. 🙏

@evkuzin
Copy link
Author

evkuzin commented Aug 13, 2025

🙏

@evkuzin
Copy link
Author

evkuzin commented Aug 20, 2025

@renecannao I'm happy to refactor if this change doesn't look good, just need some feedback from the maintainers for that.

@evkuzin
Copy link
Author

evkuzin commented Sep 19, 2025

May I ask for a review please? @renecannao

@noizu noizu added status/triage Mark issue for team triage component/telemetry labels Sep 30, 2025
@noizu
Copy link
Collaborator

noizu commented Sep 30, 2025

Thanks @evkuzin, we're a bit swamped but I'll make sure this gets triaged for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/telemetry status/triage Mark issue for team triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants