Skip to content

Commit

Permalink
fix(common/telemetry): checking of endpoint add missing http:// if …
Browse files Browse the repository at this point in the history
…necessary (#956)
  • Loading branch information
cwrau authored May 14, 2024
1 parent fa61519 commit 03c1fba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion charts/common/templates/_telemetry.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@
{{- /* no LOGS for now, loki is running anyways, so we'd even have to deduplicate the logs somehow */ -}}
{{- range $signal := list "TRACES" -}}
{{- if not (hasPrefix "http" $endpoint)}}
{{- if not (hasPrefix "https://" $endpoint) -}}
{{- $env = set $env (printf "OTEL_EXPORTER_OTLP_%s_INSECURE" $signal) $insecure -}}
{{- end -}}
{{- if not (mustRegexMatch "https?://" $endpoint) -}}
{{- $endpoint = printf "http://%s" $endpoint -}}
{{- end -}}
{{- if $serviceProtocol -}}
{{- $env = set $env (printf "OTEL_EXPORTER_OTLP_%s_PROTOCOL" $signal) $serviceProtocol -}}
{{- end -}}
Expand Down

0 comments on commit 03c1fba

Please sign in to comment.