Skip to content

Commit 954784a

Browse files
committed
Add per-db metrics to OTel
This PR adds changes to allow per-db metrics in OTel: - change API for per-db metrics - add default metrics for per-db metrics based on pgmonitor 5.2.1 - remove unusused metrics - add kuttl test
1 parent e274e01 commit 954784a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+679
-324
lines changed

config/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,11 @@ spec:
21202120
type: string
21212121
x-kubernetes-validations:
21222122
- rule: duration("0") <= self && self <= duration("60m")
2123+
database:
2124+
description: |-
2125+
The database to target with added custom queries.
2126+
Default behavior is to target `postgres`.
2127+
type: string
21232128
name:
21242129
description: |-
21252130
The name of this batch of queries, which will be used in naming the OTel
@@ -2165,6 +2170,12 @@ spec:
21652170
type: string
21662171
type: array
21672172
type: object
2173+
perDBMetricTargets:
2174+
description: User defined databases to target for default
2175+
per-db metrics
2176+
items:
2177+
type: string
2178+
type: array
21682179
type: object
21692180
resources:
21702181
description: Resources holds the resource requirements for the

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11965,6 +11965,11 @@ spec:
1196511965
type: string
1196611966
x-kubernetes-validations:
1196711967
- rule: duration("0") <= self && self <= duration("60m")
11968+
database:
11969+
description: |-
11970+
The database to target with added custom queries.
11971+
Default behavior is to target `postgres`.
11972+
type: string
1196811973
name:
1196911974
description: |-
1197011975
The name of this batch of queries, which will be used in naming the OTel
@@ -12010,6 +12015,12 @@ spec:
1201012015
type: string
1201112016
type: array
1201212017
type: object
12018+
perDBMetricTargets:
12019+
description: User defined databases to target for default
12020+
per-db metrics
12021+
items:
12022+
type: string
12023+
type: array
1201312024
type: object
1201412025
resources:
1201512026
description: Resources holds the resource requirements for the

internal/collector/generated/gte_pg16_slow_metrics.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

internal/collector/generated/lt_pg16_slow_metrics.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

internal/collector/generated/pgbackrest_metrics.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

internal/collector/generated/postgres_5m_per_db_metrics.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)