Skip to content

Commit 476452e

Browse files
author
tony-landreth
committed
Adds comments on NULL handling
1 parent 4fa2c3c commit 476452e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

internal/collector/gte_pg16_metrics.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# https://github.com/CrunchyData/pgmonitor/blob/development/sql_exporter/common/crunchy_global_collector.yml
66

77
# NOTE: Some of the columns below can return NULL values, for which sqlqueryreceiver will warn.
8-
# Those columns are idx_scan and idx_tup_fetch.
8+
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sqlqueryreceiver#null-values
9+
# Those columns are idx_scan and idx_tup_fetch and we avoid NULL by using COALESCE.
910
- sql: >
1011
SELECT
1112
current_database() as dbname

internal/collector/lt_pg16_metrics.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# https://github.com/CrunchyData/pgmonitor/blob/development/sql_exporter/common/crunchy_global_collector.yml
66

77
# NOTE: Some of the columns below can return NULL values, for which sqlqueryreceiver will warn.
8-
# Those columns are idx_scan and idx_tup_fetch. We now use COALESCE to return 0 as a default.
8+
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sqlqueryreceiver#null-values
9+
# Those columns are idx_scan and idx_tup_fetch and we avoid NULL by using COALESCE.
910
- sql: >
1011
SELECT
1112
current_database() as dbname

0 commit comments

Comments
 (0)