From 75c774d55946f07db3514abf9fe37170d0cc9184 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Tue, 23 Jul 2024 16:53:54 +0200 Subject: [PATCH] fix(mycloud-matrix): add tracing --- base-values/tracing.yaml | 2 +- .../server/authentication-service.yaml | 13 +++++++++++++ .../templates/server/sliding-sync.yaml | 6 ++++++ mycloud-matrix/values.yaml | 19 +++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/base-values/tracing.yaml b/base-values/tracing.yaml index e2e6128..99853aa 100644 --- a/base-values/tracing.yaml +++ b/base-values/tracing.yaml @@ -2,7 +2,7 @@ commons: tracing: enabled: true http: - endpoint: "http://tempo.monitoring.svc:4318/v1/traces" + endpoint: "http://tempo.monitoring.svc:4318" grpc: enabled: true insecure: true diff --git a/mycloud-matrix/templates/server/authentication-service.yaml b/mycloud-matrix/templates/server/authentication-service.yaml index 01fd56b..90a220f 100644 --- a/mycloud-matrix/templates/server/authentication-service.yaml +++ b/mycloud-matrix/templates/server/authentication-service.yaml @@ -85,6 +85,19 @@ spec: {{- else }} transport: "blackhole" {{- end }}{{/* end-if $mailHostname */}} + {{- with .Values.commons.tracing }} + {{- if .enabled }} + telemetry: + tracing: + exporter: otlp + endpoint: {{ .http.endpoint }} + propagators: + - tracecontext + - baggage + - jaeger + {{- end }} + {{- end }} + policy: data: admin_users: diff --git a/mycloud-matrix/templates/server/sliding-sync.yaml b/mycloud-matrix/templates/server/sliding-sync.yaml index 1f0173e..0e58922 100644 --- a/mycloud-matrix/templates/server/sliding-sync.yaml +++ b/mycloud-matrix/templates/server/sliding-sync.yaml @@ -32,6 +32,12 @@ spec: password: {{ .password | default (derivePassword 1 "long" $.Values.commons.masterPassword "matrix-sliding-sync" "database_password" | b64enc) | quote }} database: {{ .name | quote }} {{- end }} + {{- with .Values.commons.tracing }} + {{- if .enabled }} + opentelemetry: + url: {{ .http.endpoint }} + {{- end }} + {{- end }} ingress: enabled: true diff --git a/mycloud-matrix/values.yaml b/mycloud-matrix/values.yaml index ff232b7..7e940ed 100644 --- a/mycloud-matrix/values.yaml +++ b/mycloud-matrix/values.yaml @@ -106,6 +106,25 @@ commons: # @section -- Commons Monitoring annotations: + tracing: + # -- enable tracing on all components + # @section -- Commons Tracing + enabled: false + http: + # -- http endpoint + # @section -- Commons Tracing + endpoint: "http://tempo.monitoring.svc:4318/v1/traces" + grpc: + # -- prefer grpc over http + # @section -- Commons Tracing + enabled: true + # -- allow insecure connection per grpc + # @section -- Commons Tracing + insecure: true + # -- grpc endpoint + # @section -- Commons Tracing + endpoint: "tempo.monitoring.svc:4317" + server: # -- default: (commons.ingress.domain) host: