From 4b668d64d9a582da19587d7ea41e317f2b918772 Mon Sep 17 00:00:00 2001 From: Benjamin Blattberg Date: Fri, 21 Mar 2025 10:28:19 -0500 Subject: [PATCH 1/4] Update postgres.yaml --- helm/postgres/templates/postgres.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/helm/postgres/templates/postgres.yaml b/helm/postgres/templates/postgres.yaml index 53261360..cdcbaf7f 100644 --- a/helm/postgres/templates/postgres.yaml +++ b/helm/postgres/templates/postgres.yaml @@ -185,6 +185,26 @@ spec: {{ toYaml .Values.monitoringConfig | indent 8 }} {{- end }} {{- end }} + {{- if .Values.instrumentation }} + instrumentation: + config: + {{- if .Values.instrumentationConfig }} +{{ toYaml .Values.instrumentationConfig | indent 6 }} + {{- end }} + image: {{ default "" .Values.imageExporter | quote }} + logs: + {{- if .Values.instrumentationLogs }} +{{ toYaml .Values.instrumentationLogs | indent 6 }} + {{- end }} + metrics: + {{- if .Values.instrumentationMetrics }} +{{ toYaml .Values.instrumentationMetrics | indent 6 }} + {{- end }} + resources: + {{- if .Values.instrumentationResources }} +{{ toYaml .Values.instrumentationResources | indent 6 }} + {{- end }} + {{- end }} {{- if .Values.shutdown }} shutdown: true {{- end }} From 4a889db6f2e35d44593b36e0c1d5d7fcf7e7e3da Mon Sep 17 00:00:00 2001 From: Benjamin Blattberg Date: Fri, 21 Mar 2025 10:34:36 -0500 Subject: [PATCH 2/4] Update values.yaml --- helm/postgres/values.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/helm/postgres/values.yaml b/helm/postgres/values.yaml index f5a096f1..275cae1d 100644 --- a/helm/postgres/values.yaml +++ b/helm/postgres/values.yaml @@ -39,6 +39,12 @@ postgresVersion: 17 # below. # monitoring: false +# instrumentation enables the ability to monitor the Postgres cluster through a +# OpenTelemetry collector. This defaults to the value below. +# This feature is currently behind the feature gates OpenTelemetryLogs and +# OpenTelemetryMetrics +# instrumentation: false + ################### # Image Overrides # ################### @@ -278,6 +284,16 @@ postgresVersion: 17 # "monitoring" setting. # monitoringConfig: {} +# The following "instrumentation_" fields will set the specified parts of the instrumentation +# spec. To enable instrumentation, you need to set the "instrumentation" setting to "true". +# This feature is currently behind the feature gates OpenTelemetryMetrics and OpenTelemetryLogs. + +# instrumentationConfig: {} +# instrumentationImage: "" +# instrumentationLogs: {} +# instrumentationMetrics: {} +# instrumentationResources: {} + ####################### # Kubernetes Settings # ####################### From 3171e1c1b15bdd25c717635182569682ce5ed1e5 Mon Sep 17 00:00:00 2001 From: Benjamin Blattberg Date: Fri, 21 Mar 2025 10:34:43 -0500 Subject: [PATCH 3/4] Update postgres.yaml --- helm/postgres/templates/postgres.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/postgres/templates/postgres.yaml b/helm/postgres/templates/postgres.yaml index cdcbaf7f..f4a861a4 100644 --- a/helm/postgres/templates/postgres.yaml +++ b/helm/postgres/templates/postgres.yaml @@ -191,7 +191,7 @@ spec: {{- if .Values.instrumentationConfig }} {{ toYaml .Values.instrumentationConfig | indent 6 }} {{- end }} - image: {{ default "" .Values.imageExporter | quote }} + image: {{ default "" .Values.instrumentationImage | quote }} logs: {{- if .Values.instrumentationLogs }} {{ toYaml .Values.instrumentationLogs | indent 6 }} From f85e3e224f228557d6d0a3b4f4b098d4d4259107 Mon Sep 17 00:00:00 2001 From: Benjamin Blattberg Date: Mon, 24 Mar 2025 17:25:45 -0500 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Drew Sessler <36803518+dsessler7@users.noreply.github.com> --- helm/postgres/values.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helm/postgres/values.yaml b/helm/postgres/values.yaml index 275cae1d..957eda00 100644 --- a/helm/postgres/values.yaml +++ b/helm/postgres/values.yaml @@ -39,10 +39,11 @@ postgresVersion: 17 # below. # monitoring: false -# instrumentation enables the ability to monitor the Postgres cluster through a +# instrumentation enables the ability to monitor the Postgres cluster through an # OpenTelemetry collector. This defaults to the value below. # This feature is currently behind the feature gates OpenTelemetryLogs and -# OpenTelemetryMetrics +# OpenTelemetryMetrics; at least one of these feature gates must be turned +# on for `instrumentation` to be turned on. # instrumentation: false ###################