Fix mysql.index.reads/updates/deletes submitted as gauge instead of monotonic_count#24125
Merged
eric-weaver merged 5 commits intoJun 22, 2026
Merged
Conversation
…gauge count_read/count_update/count_delete in performance_schema.table_io_waits_summary_by_index_usage are cumulative counters. Submitting them as gauge caused mysql.index.reads/updates/deletes to show as monotonically increasing raw totals rather than delta counts per collection interval.
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: c573510 | Docs | Datadog PR Page | Give us feedback! |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…metrics monotonic_count submissions map to count in the Datadog backend. assert_metrics_using_metadata with check_submission_type=True applies METRIC_TYPE_SUBMISSION_TO_BACKEND_MAP before comparing, so metadata.csv must use count not monotonic_count. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…revents emission monotonic_count metrics with collection_interval=300 are never emitted in E2E: check_rate=True runs the check twice but the second run skips the query (300s not elapsed), so no delta is flushed. Use at_least=0 in E2E mode. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Validation ReportAll 21 validations passed. Show details
|
eric-weaver
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
QUERY_INDEX_USAGEinindex_metrics.pycollectscount_read,count_update, andcount_deletefromperformance_schema.table_io_waits_summary_by_index_usage. These are cumulative counters, but they were submitted with'type': 'gauge', causingmysql.index.reads,mysql.index.updates, andmysql.index.deletesto report raw monotonically increasing totals rather than per-interval counts.This PR changes the metric type to
monotonic_count, consistent with how other cumulative performance_schema counters are handled in this check (e.g.mysql.innodb.deadlocks,mysql.performance.wait_event.count).Motivation
Customer escalation (SDBM-2685): after upgrading from MariaDB 10.6 to 11.4,
mysql.index.reads/updates/deletesappeared as continuously increasing values in dashboards. Root cause confirmed in code and reproduced in staging (datad0g.com): all MySQL/MariaDB/Aurora hosts withperformance_schemaenabled show the same monotonically increasing pattern.The bug affects all agents ≥ 7.63.0 (when
index_metricsshipped in integration 14.5.0). It is not MariaDB-specific — confirmed present on Aurora MySQL in staging as well.Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged