From ee85017b7556ba4ccaa66594138392dc4440cf8b Mon Sep 17 00:00:00 2001 From: Clayton Cornell Date: Thu, 30 Jul 2026 12:41:43 -0700 Subject: [PATCH 01/10] Clean up topic and add exported fields --- .../database_observability.mysql.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/sources/reference/components/database_observability/database_observability.mysql.md b/docs/sources/reference/components/database_observability/database_observability.mysql.md index bc5083ad3e0..5f35e1f2ed2 100644 --- a/docs/sources/reference/components/database_observability/database_observability.mysql.md +++ b/docs/sources/reference/components/database_observability/database_observability.mysql.md @@ -6,6 +6,7 @@ labels: stage: general-availability products: - oss +review_date: 2026-07-30 --- # `database_observability.mysql` @@ -35,7 +36,7 @@ You can use the following arguments with `database_observability.mysql`: | `disable_collectors` | `list(string)` | A list of collectors to disable from the default set. | | no | | `enable_collectors` | `list(string)` | A list of collectors to enable on top of the default set. | | no | | `exclude_schemas` | `list(string)` | A list of schemas to exclude from monitoring. | `["alloydbadmin", "alloydbmetadata", "azure_maintenance", "azure_sys", "cloudsqladmin", "rdsadmin"]` | no | -| `allow_update_performance_schema_settings` | `boolean` | Whether to allow updates to `performance_schema` settings in any collector. Enable this in conjunction with other collector-specific settings where required. | `false` | no | +| `allow_update_performance_schema_settings` | `bool` | Whether to allow updates to `performance_schema` settings in any collector. Enable this in conjunction with other collector-specific settings where required. | `false` | no | The following collectors are configurable: @@ -143,7 +144,7 @@ The `gcp` block supplies the identifying information for the GCP Cloud SQL datab | Name | Type | Description | Default | Required | |--------------------|------------|-------------------------------------------------------------|---------|----------| | `collect_interval` | `duration` | How frequently to collect information from database. | `"1m"` | no | -| `cache_enabled` | `boolean` | Deprecated. Whether to enable caching of table definitions. | `true` | no | +| `cache_enabled` | `bool` | Deprecated. Whether to enable caching of table definitions. | `true` | no | | `cache_size` | `integer` | Deprecated. Cache size. | `256` | no | | `cache_ttl` | `duration` | Deprecated. Cache TTL. | `"10m"` | no | @@ -170,17 +171,17 @@ The `cache_enabled`, `cache_size`, and `cache_ttl` settings are deprecated: they |----------------------------------|------------|--------------------------------------------------------------------------------|---------|----------| | `collect_interval` | `duration` | How frequently to collect information from database. | `"10s"` | no | | `disable_query_redaction` | `bool` | Collect unredacted SQL query text (including query parameters) and query error messages. | `false` | no | -| `auto_enable_setup_consumers` | `boolean` | Enables specific `performance_schema.setup_consumers` options. You must also enable `allow_update_performance_schema_settings`. | `false` | no | +| `auto_enable_setup_consumers` | `bool` | Enables specific `performance_schema.setup_consumers` options. You must also enable `allow_update_performance_schema_settings`. | `false` | no | | `setup_consumers_check_interval` | `duration` | How frequently to check if `setup_consumers` are correctly enabled. | `"1h"` | no | | `sample_min_duration` | `duration` | Minimum duration for query samples to be collected. Set to "0s" to disable filtering and collect all samples regardless of their duration.| `"0s"` | no | | `wait_event_min_duration` | `duration` | Minimum duration for a wait event to be collected. Set to "0s" to disable filtering and collect all wait events regardless of their duration. | `"1us"` | no | -| `enable_pre_classified_wait_events` | `boolean` | When `true`, emits telemetry data with pre-classified wait event information. | `false` | no | +| `enable_pre_classified_wait_events` | `bool` | When `true`, emits telemetry data with pre-classified wait event information. | `false` | no | ### `setup_actors` | Name | Type | Description | Default | Required | | -------------------------- | ---------- | ---------------------------------------------------------------------- | ------- | -------- | -| `auto_update_setup_actors` | `boolean` | Enables updates to `performance_schema.setup_actors` settings. You must also enable `allow_update_performance_schema_settings`.| `false` | no | +| `auto_update_setup_actors` | `bool` | Enables updates to `performance_schema.setup_actors` settings. You must also enable `allow_update_performance_schema_settings`.| `false` | no | | `collect_interval` | `duration` | How frequently to check if `setup_actors` are configured correctly. | `"1h"` | no | @@ -197,6 +198,14 @@ The `data_source_name` is inherited from the parent block. Refer to [`prometheus.exporter.mysql`](../../prometheus/prometheus.exporter.mysql/) docs for the full list of supported arguments and sub-blocks. +## Exported fields + +The following fields are exported and can be referenced by other components. + +| Name | Type | Description | +|-----------|---------------------|-------------------------------------------------------------------------------------| +| `targets` | `list(map(string))` | The targets that can be used to collect metrics of instrumented services with Prometheus scraping. | + ## Example ```alloy From 13baaf8025d63004b8bec71969d571cd0260c381 Mon Sep 17 00:00:00 2001 From: Clayton Cornell Date: Thu, 30 Jul 2026 12:48:16 -0700 Subject: [PATCH 02/10] Strip the big example out of topic --- .../database_observability.mysql.md | 75 +++---------------- 1 file changed, 9 insertions(+), 66 deletions(-) diff --git a/docs/sources/reference/components/database_observability/database_observability.mysql.md b/docs/sources/reference/components/database_observability/database_observability.mysql.md index 5f35e1f2ed2..6659f41227e 100644 --- a/docs/sources/reference/components/database_observability/database_observability.mysql.md +++ b/docs/sources/reference/components/database_observability/database_observability.mysql.md @@ -209,72 +209,15 @@ The following fields are exported and can be referenced by other components. ## Example ```alloy -database_observability.mysql "orders_db" { - data_source_name = "user:pass@tcp(mysql:3306)/" - forward_to = [loki.relabel.orders_db.receiver] - targets = prometheus.exporter.mysql.orders_db.targets +database_observability.mysql "