Skip to content

Add gtid_transaction counter taken from @gtid_executed #964

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

Closed
wants to merge 4 commits into from

Conversation

sjmudd
Copy link

@sjmudd sjmudd commented Jul 16, 2025

This PR add a global transaction counter for MySQL when using GTIDs which is basically the default for any modern version of MySQL.

  • This should work from MySQL 5.6 when GTIDs were added
  • A single transaction counter is generated from the GTID executed value
  • gaps in transactions and also the new 8.4+ tagged GTIDs format is handled.
  • The metric is exposed as mysql_gtid_transactions and is most useful when checking rate of change e.g. transactions per second.

I am not aware of any other transaction counter provided by MySQL explicitly.

sjmudd added 4 commits July 16, 2025 12:30
also a few other cleanups
Add a new collector for GTID transactions using the value from @@gtid_executed to determine a transaction counter
@sjmudd
Copy link
Author

sjmudd commented Jul 16, 2025

I wasn't aware of sign off requirements. I'll drop this PR and redo it after signing off next time.

@sjmudd sjmudd closed this Jul 16, 2025
@sjmudd
Copy link
Author

sjmudd commented Jul 16, 2025

Replaced by: #965

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant