From 8b62fc4afbe0f9fe450043288461960e9fe78286 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 14 Nov 2024 11:25:38 +0800 Subject: [PATCH] feat(query): add query and profile log config (#112) --- .gitignore | 1 + .../databend-query/templates/configmap.yaml | 20 +++++++++++++++++++ charts/databend-query/values.yaml | 8 ++++++++ 3 files changed, 29 insertions(+) diff --git a/.gitignore b/.gitignore index f050253..af95ab6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ */*/charts/ +.idea diff --git a/charts/databend-query/templates/configmap.yaml b/charts/databend-query/templates/configmap.yaml index 4e8c18f..deb9c2b 100644 --- a/charts/databend-query/templates/configmap.yaml +++ b/charts/databend-query/templates/configmap.yaml @@ -53,6 +53,26 @@ data: [log.stderr] on = {{ .Values.config.log.stderr.enabled }} level = {{ .Values.config.log.stderr.level | default "WARN" | quote }} + [log.query] + on = {{ .Values.config.log.query.enabled }} + otlp_endpoint = {{ .Values.config.log.query.otlp_endpoint | quote }} + otlp_protocol = {{ .Values.config.log.query.otlp_protocol | default "http" | quote }} + {{- with .Values.config.log.query.otlp_labels }} + [log.query.otlp_labels] + {{- range $key, $value := . }} + {{ $key }} = {{ $value | quote }} + {{- end }} + {{- end }} + [log.profile] + on = {{ .Values.config.log.profile.enabled }} + otlp_endpoint = {{ .Values.config.log.profile.otlp_endpoint | quote }} + otlp_protocol = {{ .Values.config.log.profile.otlp_protocol | default "http" | quote }} + {{- with .Values.config.log.profile.otlp_labels }} + [log.profile.otlp_labels] + {{- range $key, $value := . }} + {{ $key }} = {{ $value | quote }} + {{- end }} + {{- end }} [meta] {{- if .Values.config.meta.generateEndpoints }} diff --git a/charts/databend-query/values.yaml b/charts/databend-query/values.yaml index bed015a..8175632 100644 --- a/charts/databend-query/values.yaml +++ b/charts/databend-query/values.yaml @@ -106,6 +106,14 @@ config: stderr: enabled: true level: "WARN" + query: + enabled: false + otlp_endpoint: "" + otlp_protocol: "http" + profile: + enabled: false + otlp_endpoint: "" + otlp_protocol: "http" # [meta] meta: