Skip to content

Commit 638add8

Browse files
authored
chore(common): add documentation about template usage (#1426)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Enhanced the description of telemetry configuration settings to clarify parameter usage such as connection details and optional protocols without altering functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent fdf3b21 commit 638add8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

charts/common/templates/_telemetry.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
{{- end -}}
3333
{{- end -}}
3434

35+
{{/*
36+
Returns a dict for configuring otel traces, containing `enabled`, `host`, `port`, `endpoint`, `serviceProtocol`, `insecure`.
37+
{{- $telemetryConf := include "common.telemetry.conf" (dict "protocol" "otlp" "serviceProtocol" "grpc" "global" $) | fromYaml }}
38+
`serviceProtocol` is optional, will just not be used (probably using `grpc`).
39+
Be sure to cast the port back to int by using `{{ int64 $telemetryConf.port }}` for usage, it's a float by default
40+
*/}}
3541
{{- define "common.telemetry.conf" -}}
3642
{{- $conf := dict "enabled" false -}}
3743
{{- $protocol := .protocol -}}

0 commit comments

Comments
 (0)