Skip to content

Add gtid_transaction counter taken from @gtid_executed - #964

Closed
sjmudd wants to merge 4 commits into
prometheus:mainfrom
sjmudd:main
Closed

Add gtid_transaction counter taken from @gtid_executed#964
sjmudd wants to merge 4 commits into
prometheus:mainfrom
sjmudd:main

Conversation

@sjmudd

@sjmudd sjmudd commented Jul 16, 2025

Copy link
Copy Markdown

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

sjmudd commented Jul 16, 2025

Copy link
Copy Markdown
Author

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

sjmudd commented Jul 16, 2025

Copy link
Copy Markdown
Author

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