From 760e836c7326b0bdb1096c528bdfe4e65ca71c08 Mon Sep 17 00:00:00 2001 From: sghosh23 Date: Tue, 16 Jun 2026 16:48:55 +0200 Subject: [PATCH] Add optional OpenTelemetry (OTEL) configuration for services Introduce a top-level `otel` config block in the wire-server chart values. When `otel.enabled` is true, OTEL_* environment variables are injected into the brig, galley, gundeck, cargohold, spar, and background-worker pods. --- .../templates/background-worker/deployment.yaml | 12 ++++++++++++ charts/wire-server/templates/brig/deployment.yaml | 12 ++++++++++++ .../wire-server/templates/cargohold/deployment.yaml | 12 ++++++++++++ charts/wire-server/templates/galley/deployment.yaml | 12 ++++++++++++ charts/wire-server/templates/gundeck/deployment.yaml | 12 ++++++++++++ charts/wire-server/templates/spar/deployment.yaml | 12 ++++++++++++ charts/wire-server/values.yaml | 8 ++++++++ 7 files changed, 80 insertions(+) diff --git a/charts/wire-server/templates/background-worker/deployment.yaml b/charts/wire-server/templates/background-worker/deployment.yaml index e2f6ef5250e..2a8d62b0955 100644 --- a/charts/wire-server/templates/background-worker/deployment.yaml +++ b/charts/wire-server/templates/background-worker/deployment.yaml @@ -118,6 +118,18 @@ spec: secretKeyRef: name: background-worker key: rabbitmqPassword + {{- if .Values.otel.enabled }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .Values.otel.endpoint | quote }} + - name: OTEL_EXPORTER_OTLP_PROTOCOL + value: {{ .Values.otel.protocol | quote }} + - name: OTEL_EXPORTER_OTLP_INSECURE + value: {{ .Values.otel.insecure | toString | quote }} + - name: OTEL_SERVICE_NAME + value: background-worker + - name: OTEL_TRACES_EXPORTER + value: otlp + {{- end }} startupProbe: httpGet: scheme: HTTP diff --git a/charts/wire-server/templates/brig/deployment.yaml b/charts/wire-server/templates/brig/deployment.yaml index cbf6b56ff75..82a81c5f84d 100644 --- a/charts/wire-server/templates/brig/deployment.yaml +++ b/charts/wire-server/templates/brig/deployment.yaml @@ -157,6 +157,18 @@ spec: secretKeyRef: name: brig key: rabbitmqPassword + {{- if .Values.otel.enabled }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .Values.otel.endpoint | quote }} + - name: OTEL_EXPORTER_OTLP_PROTOCOL + value: {{ .Values.otel.protocol | quote }} + - name: OTEL_EXPORTER_OTLP_INSECURE + value: {{ .Values.otel.insecure | toString | quote }} + - name: OTEL_SERVICE_NAME + value: brig + - name: OTEL_TRACES_EXPORTER + value: otlp + {{- end }} ports: - containerPort: {{ .Values.brig.service.internalPort }} startupProbe: diff --git a/charts/wire-server/templates/cargohold/deployment.yaml b/charts/wire-server/templates/cargohold/deployment.yaml index 10fca7259ed..b1566684c2d 100644 --- a/charts/wire-server/templates/cargohold/deployment.yaml +++ b/charts/wire-server/templates/cargohold/deployment.yaml @@ -90,6 +90,18 @@ spec: value: {{ join "," .noProxyList | quote }} {{- end }} {{- end }} + {{- if .Values.otel.enabled }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .Values.otel.endpoint | quote }} + - name: OTEL_EXPORTER_OTLP_PROTOCOL + value: {{ .Values.otel.protocol | quote }} + - name: OTEL_EXPORTER_OTLP_INSECURE + value: {{ .Values.otel.insecure | toString | quote }} + - name: OTEL_SERVICE_NAME + value: cargohold + - name: OTEL_TRACES_EXPORTER + value: otlp + {{- end }} ports: - containerPort: {{ .Values.cargohold.service.internalPort }} livenessProbe: diff --git a/charts/wire-server/templates/galley/deployment.yaml b/charts/wire-server/templates/galley/deployment.yaml index e95638c2dd1..a6013f0618c 100644 --- a/charts/wire-server/templates/galley/deployment.yaml +++ b/charts/wire-server/templates/galley/deployment.yaml @@ -127,6 +127,18 @@ spec: name: galley key: rabbitmqPassword {{- end }} + {{- if .Values.otel.enabled }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .Values.otel.endpoint | quote }} + - name: OTEL_EXPORTER_OTLP_PROTOCOL + value: {{ .Values.otel.protocol | quote }} + - name: OTEL_EXPORTER_OTLP_INSECURE + value: {{ .Values.otel.insecure | toString | quote }} + - name: OTEL_SERVICE_NAME + value: galley + - name: OTEL_TRACES_EXPORTER + value: otlp + {{- end }} ports: - containerPort: {{ .Values.galley.service.internalPort }} livenessProbe: diff --git a/charts/wire-server/templates/gundeck/deployment.yaml b/charts/wire-server/templates/gundeck/deployment.yaml index b7d677c88c7..7658854c272 100644 --- a/charts/wire-server/templates/gundeck/deployment.yaml +++ b/charts/wire-server/templates/gundeck/deployment.yaml @@ -160,6 +160,18 @@ spec: value: {{ join "," .noProxyList | quote }} {{- end }} {{- end }} + {{- if .Values.otel.enabled }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .Values.otel.endpoint | quote }} + - name: OTEL_EXPORTER_OTLP_PROTOCOL + value: {{ .Values.otel.protocol | quote }} + - name: OTEL_EXPORTER_OTLP_INSECURE + value: {{ .Values.otel.insecure | toString | quote }} + - name: OTEL_SERVICE_NAME + value: gundeck + - name: OTEL_TRACES_EXPORTER + value: otlp + {{- end }} ports: - containerPort: {{ .Values.gundeck.service.internalPort }} livenessProbe: diff --git a/charts/wire-server/templates/spar/deployment.yaml b/charts/wire-server/templates/spar/deployment.yaml index f1f7b5b910d..5cba48f7b64 100644 --- a/charts/wire-server/templates/spar/deployment.yaml +++ b/charts/wire-server/templates/spar/deployment.yaml @@ -78,6 +78,18 @@ spec: value: {{ join "," .noProxyList | quote }} {{- end }} {{- end }} + {{- if .Values.otel.enabled }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .Values.otel.endpoint | quote }} + - name: OTEL_EXPORTER_OTLP_PROTOCOL + value: {{ .Values.otel.protocol | quote }} + - name: OTEL_EXPORTER_OTLP_INSECURE + value: {{ .Values.otel.insecure | toString | quote }} + - name: OTEL_SERVICE_NAME + value: spar + - name: OTEL_TRACES_EXPORTER + value: otlp + {{- end }} ports: - containerPort: {{ .Values.spar.service.internalPort }} livenessProbe: diff --git a/charts/wire-server/values.yaml b/charts/wire-server/values.yaml index 1692ffb9b37..8332f78f923 100644 --- a/charts/wire-server/values.yaml +++ b/charts/wire-server/values.yaml @@ -13,6 +13,14 @@ tags: integration: false proxy: false +# OpenTelemetry configuration for services. +# Set enabled: true to inject OTEL_* environment variables into service pods. +otel: + enabled: false + endpoint: http://otel-collector:4318 + protocol: http/protobuf + insecure: true + galley: replicaCount: 3 image: