Add MySQL DBI integration tests - #717
Open
Klarsen04 wants to merge 8 commits into
Open
Conversation
Klarsen04
force-pushed
the
feature/mysql-dbi-integration-tests
branch
from
June 30, 2026 18:46
5d4cf96 to
5a1f0cc
Compare
Klarsen04
marked this pull request as draft
July 1, 2026 16:11
Klarsen04
force-pushed
the
feature/mysql-dbi-integration-tests
branch
12 times, most recently
from
July 10, 2026 14:57
e300e27 to
caea3e1
Compare
added 2 commits
July 10, 2026 14:59
Implement end-to-end integration tests for MySQL database insights, mirroring the existing PostgreSQL DBI test in test/otel_collect/database_insights. - Setup script installs MySQL across yum/apt/zypper, enables performance_schema with statement/wait consumers, configures the error log, and creates a cw_monitor user (SELECT on performance_schema, PROCESS, REPLICATION CLIENT) plus a sysbench workload user - Agent config targets localhost:3306 with a pgpass-style passfile - Workload generation via sysbench oltp_read_write (mysqlslap fallback) - Validates counter metrics (enabled-by-default receiver metrics only), the 7 DB Load metrics, and Top SQL metrics via PromQL with resource attribute labels (db.system.name=mysql, db.instance.name) - Validates mysqld process metrics from the host metrics process scraper - Validates server logs and raw events in CloudWatch Logs, including db.server.top_query event attributes - Register in test case generator with ol8/ubuntu-25 exclusions and exclude from ARM64 itar/china partitions (same as PostgreSQL DBI tests)
Klarsen04
force-pushed
the
feature/mysql-dbi-integration-tests
branch
from
July 10, 2026 14:59
caea3e1 to
233d6ec
Compare
added 4 commits
July 23, 2026 23:24
Add assertions for the DBI-enabled console metrics (mysql.connection.count, mysql.connection.errors, mysql.max_used_connections, mysql.commands, mysql.query.count, mysql.table.size), the new InnoDB metrics (mysql.deadlocks, mysql.history_list_length, mysql.active_transactions), the remaining Top SQL digest sums (sum_rows_affected, sum_select_range_check, sum_sort_merge_passes, sum_sort_range), and process.threads.
process.threads is emitted by the shared DBI hostmetrics process scraper for both engines; assert it in the postgres test for parity with mysql.
Klarsen04
marked this pull request as ready for review
August 7, 2026 14:18
added 2 commits
August 13, 2026 14:47
Add mysql.query.client.count and mysql.query.slow.count to the MySQL DBI integration test's counter metric validation list. These two metrics were enabled agent-side in the MySQL receiver translator and are emitted by the receiver on every scrape, so the presence-based OTLP metric validator will confirm they reach CloudWatch.
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.
Summary
Add integration tests for MySQL Database Insights (DBI) pipeline, mirroring the existing PostgreSQL DBI tests.
Changes
database_insights_mysql_test.go): Validates MySQL counter metrics, DB Load metrics (7 active session dimensions), Top SQL metrics, server-logs and raw-events log groups, process metrics for mysqld, and top_query event attributes.database_insights_mysql_config.json): Minimal config withopentelemetry.collect.database_insights.mysqltargeting localhost:3306.database_insights_mysql_setup.sh): Cross-distro MySQL installation (yum/apt/zypper), performance_schema configuration, monitoring user creation, and passfile setup.Testing
db.system.name=mysql,db.instance.name=dbi-mysql-integ-test)