Add MySQL DBI integration tests#717
Draft
Klarsen04 wants to merge 1 commit into
Draft
Conversation
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)
5d4cf96 to
5a1f0cc
Compare
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)