|
36 | 36 | {{- fail (join "\n" $msg) }}
|
37 | 37 | {{- end }}
|
38 | 38 |
|
39 |
| - {{/* Check if OTLP destination using Grafana Cloud OTLP gateway has protocol set */}} |
40 |
| - {{- if and (eq $destination.type "otlp") (ne $destination.protocol "http") (regexMatch "otlp-gateway-.+grafana\\.net" $destination.url) }} |
41 |
| - {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud OTLP gateway but has incorrect protocol '%s'. The gateway requires 'http'.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n protocol: http" $i $destination.name ($destination.protocol | default "grpc (default)") $destination.name $destination.url) }} |
42 |
| - {{- end }} |
43 |
| - |
44 |
| - {{/* Check if OTLP destination using Grafana Cloud Tempo checks */}} |
45 |
| - {{- if and (eq $destination.type "otlp") (regexMatch "tempo-.+grafana\\.net" $destination.url) }} |
46 |
| - {{- if ne $destination.protocol "grpc" }} |
47 |
| - {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud Traces but has incorrect protocol '%s'. Grafana Cloud Traces requires 'grpc'.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n protocol: grpc" $i $destination.name ($destination.protocol | default "grpc (default)") $destination.name $destination.url) }} |
48 |
| - {{- end }} |
49 |
| - {{- if eq (dig "metrics" "enabled" true $destination) true }} |
50 |
| - {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud Traces but has metrics enabled. Tempo only supports traces.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n metrics:\n enabled: false" $i $destination.name $destination.name $destination.url) }} |
| 39 | + {{- if (eq $destination.type "otlp") }} |
| 40 | + {{/* Check if OTLP destination using Grafana Cloud OTLP gateway has protocol set */}} |
| 41 | + {{- if and (ne $destination.protocol "http") (regexMatch "otlp-gateway-.+grafana\\.net" $destination.url) }} |
| 42 | + {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud OTLP gateway but has incorrect protocol '%s'. The gateway requires 'http'.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n protocol: http" $i $destination.name ($destination.protocol | default "grpc (default)") $destination.name $destination.url) }} |
51 | 43 | {{- end }}
|
52 |
| - {{- if eq (dig "logs" "enabled" true $destination) true }} |
53 |
| - {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud Traces but has logs enabled. Tempo only supports traces.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n logs:\n enabled: false" $i $destination.name $destination.name $destination.url) }} |
54 |
| - {{- end }} |
55 |
| - {{- if eq (dig "traces" "enabled" true $destination) false }} |
56 |
| - {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud Traces but has traces disabled.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n traces:\n enabled: true" $i $destination.name $destination.name $destination.url) }} |
| 44 | + |
| 45 | + {{/* Check if OTLP destination using Grafana Cloud Tempo checks */}} |
| 46 | + {{- if and (regexMatch "tempo-.+grafana\\.net" $destination.url) }} |
| 47 | + {{- if ne $destination.protocol "grpc" }} |
| 48 | + {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud Traces but has incorrect protocol '%s'. Grafana Cloud Traces requires 'grpc'.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n protocol: grpc" $i $destination.name ($destination.protocol | default "grpc (default)") $destination.name $destination.url) }} |
| 49 | + {{- end }} |
| 50 | + {{- if eq (dig "metrics" "enabled" true $destination) true }} |
| 51 | + {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud Traces but has metrics enabled. Tempo only supports traces.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n metrics:\n enabled: false" $i $destination.name $destination.name $destination.url) }} |
| 52 | + {{- end }} |
| 53 | + {{- if eq (dig "logs" "enabled" true $destination) true }} |
| 54 | + {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud Traces but has logs enabled. Tempo only supports traces.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n logs:\n enabled: false" $i $destination.name $destination.name $destination.url) }} |
| 55 | + {{- end }} |
| 56 | + {{- if eq (dig "traces" "enabled" true $destination) false }} |
| 57 | + {{ fail (printf "\nDestination #%d (%s) is using Grafana Cloud Traces but has traces disabled.\nPlease set:\ndestinations:\n - name: %s\n type: otlp\n url: %s\n traces:\n enabled: true" $i $destination.name $destination.name $destination.url) }} |
| 58 | + {{- end }} |
57 | 59 | {{- end }}
|
58 | 60 | {{- end }}
|
59 | 61 |
|
|
0 commit comments