From 077b787e081065e8fcdca62f8076ed298e007a53 Mon Sep 17 00:00:00 2001 From: MattNolf <86960799+matthewnolf@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:17:31 +0000 Subject: [PATCH] database_observability: Fix selectTableName query column order (#2452) * Fix query select order * Update changelog --- CHANGELOG.md | 2 ++ .../database_observability/mysql/collector/schema_table.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8da453539e..2e9ccc239d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ Main (unreleased) - (_Experimental_) Capture schema name for query samples in `database_observability.mysql` (@cristiangreco) +- (_Experimental_) Fix handling of view table types when detecting schema in `database_observability.mysql` (@matthewnolf) + - Add json format support for log export via faro receiver (@ravishankar15) - Add livedebugging support for `prometheus.remote_write` (@ravishankar15) diff --git a/internal/component/database_observability/mysql/collector/schema_table.go b/internal/component/database_observability/mysql/collector/schema_table.go index 193cf4d8ac..1e88ea24ec 100644 --- a/internal/component/database_observability/mysql/collector/schema_table.go +++ b/internal/component/database_observability/mysql/collector/schema_table.go @@ -35,8 +35,8 @@ const ( selectTableName = ` SELECT TABLE_NAME, - CREATE_TIME, TABLE_TYPE, + CREATE_TIME, ifnull(UPDATE_TIME, CREATE_TIME) AS UPDATE_TIME FROM information_schema.tables