Skip to content

Commit 9e7cfdc

Browse files
feat(chart): add otel configuration
1 parent 168ee9c commit 9e7cfdc

5 files changed

Lines changed: 38 additions & 1 deletion

File tree

‎charts/abstract-node/Chart.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: abstract-node
33
description: External node for syncing and serving blockchain data for Abstract
4-
version: 0.1.42
4+
version: 0.1.43
55
type: application
66
icon: https://abstract-assets.abs.xyz/icons/light.png
77
keywords:

‎charts/abstract-node/templates/_helpers.tpl‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,28 @@ Create the name of the service account to use
6161
{{- end }}
6262
{{- end }}
6363

64+
{{/*
65+
Render OpenTelemetry environment variables for the external node container.
66+
*/}}
67+
{{- define "abstract-node.otelEnv" -}}
68+
{{- with .Values.otel }}
69+
{{- if .enabled }}
70+
- name: OPENTELEMETRY_LEVEL
71+
value: {{ .level | quote }}
72+
{{- with .endpoint }}
73+
- name: OTLP_ENDPOINT
74+
value: {{ . | quote }}
75+
{{- end }}
76+
{{- with .serviceName }}
77+
- name: SERVICE_NAME
78+
value: {{ . | quote }}
79+
{{- end }}
80+
- name: EN_EXTENDED_RPC_TRACING
81+
value: {{ .extendedRpcTracing | quote }}
82+
{{- end }}
83+
{{- end }}
84+
{{- end }}
85+
6486
{{/*
6587
HA core StatefulSet / governing service name.
6688
*/}}

‎charts/abstract-node/templates/deployment-api.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ spec:
182182
- name: EN_API_SEND_RAW_TX_SYNC_DEFAULT_TIMEOUT_MS
183183
value: {{ .Values.rpc.sendRawTxSyncDefaultTimeout | quote }}
184184
{{- end }}
185+
{{- if .Values.otel.enabled }}
186+
{{- include "abstract-node.otelEnv" . | nindent 12 }}
187+
{{- end }}
185188
{{- range $name, $value := .Values.node.extraEnv }}
186189
- name: {{ $name | quote }}
187190
value: {{ $value | quote }}

‎charts/abstract-node/templates/statefulset.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ spec:
215215
- name: EN_API_SEND_RAW_TX_SYNC_DEFAULT_TIMEOUT_MS
216216
value: {{ .Values.rpc.sendRawTxSyncDefaultTimeout | quote }}
217217
{{- end }}
218+
{{- if .Values.otel.enabled }}
219+
{{- include "abstract-node.otelEnv" . | nindent 12 }}
220+
{{- end }}
218221
{{- range $name, $value := .Values.node.extraEnv }}
219222
- name: {{ $name | quote }}
220223
value: {{ $value | quote }}

‎charts/abstract-node/values.yaml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,15 @@ metrics:
289289
##
290290
rules: []
291291

292+
otel:
293+
## Configure OpenTelemetry environment variables for the external node container.
294+
##
295+
enabled: false
296+
level: info
297+
endpoint: ""
298+
serviceName: ""
299+
extendedRpcTracing: false
300+
292301
## Configure resource requests and limits.
293302
## http://kubernetes.io/docs/user-guide/compute-resources/
294303
##

0 commit comments

Comments
 (0)