Skip to content

PMM-14958 Fix duplicate metrics errors#353

Open
ademidoff wants to merge 5 commits intomainfrom
PMM-14958-fix-duplicate-metrics-errors
Open

PMM-14958 Fix duplicate metrics errors#353
ademidoff wants to merge 5 commits intomainfrom
PMM-14958-fix-duplicate-metrics-errors

Conversation

@ademidoff
Copy link
Copy Markdown
Member

@ademidoff ademidoff commented Mar 27, 2026

SUBMODULES-4286

This pull request enhances the support for monitoring MySQL group replication with parallel replication workers. It updates the custom queries and their corresponding tests to include the worker_id label, which allows metrics to be reported separately for each replication worker thread. This change improves observability in environments where parallel replication is used.

Key changes:

Custom Query Enhancements:

  • Updated the mysql_perf_schema_replication_group_worker and mysql_perf_schema_replication_group_worker_5 queries in both queries-mysqld-group-replication.yml and percona/tests/custom-queries/high-resolution/queries-mysqld-group-replication.yml to select and expose the worker_id field, enabling per-worker metrics. [1] [2]
  • Added the worker_id label to the metrics definitions, with descriptions clarifying its meaning for both single-threaded and parallel replication scenarios. [1] [2]

Testing Improvements:

  • Added a new unit test (TestScrapeCustomQueriesReplicationGroupWorkerParallelReplication) in collector/percona_custom_query_test.go to verify that metrics are correctly produced for each parallel replication worker, ensuring the new worker_id label is handled as expected.

These changes improve the accuracy and granularity of replication monitoring for MySQL instances using group replication with parallel workers.

@ademidoff ademidoff force-pushed the PMM-14958-fix-duplicate-metrics-errors branch from 3959aba to 2749855 Compare March 30, 2026 12:58
@ademidoff ademidoff marked this pull request as ready for review March 30, 2026 13:03
@ademidoff ademidoff requested a review from a team as a code owner March 30, 2026 13:03
@ademidoff ademidoff requested review from JiriCtvrtka and maxkondr and removed request for a team March 30, 2026 13:03
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.

2 participants