{{ define "alloy.config.receivers.zipkin" }}
{{- if and .Values.receivers.zipkin.enabled .Values.traces.enabled }}
// Zipkin Receiver
otelcol.receiver.zipkin "receiver" {
  debug_metrics {
    disable_high_cardinality_metrics = {{ .Values.receivers.zipkin.disable_debug_metrics }}
  }

{{$data := dict "port" .Values.receivers.zipkin.port "type" "Zipkin" "alloy" .Values.alloy.alloy }}
{{- include "checkforAlloyPort" $data -}}
  endpoint = "0.0.0.0:{{ $data.port | int }}"
  output {
    traces = [otelcol.processor.k8sattributes.default.input]
  }
}
{{- end }}
{{ end }}
