Skip to content

Commit

Permalink
enable tracing
Browse files Browse the repository at this point in the history
Signed-off-by: David van der Spek <[email protected]>
  • Loading branch information
davidspek committed Sep 12, 2023
1 parent 44c7006 commit 632c386
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 6 deletions.
17 changes: 14 additions & 3 deletions grafana-agent/helm/grafana-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ traces: # TODO: split this into 2 deployment to allow for tail based sampling. F
port: 6831
targetPort: 6831
protocol: "UDP"
- name: http-zipkin
port: 9411
targetPort: 9411
protocol: "TCP"
mimirHost: http://mimir-nginx.mimir
lokiHost: http://loki-loki-distributed-gateway.loki/loki/api/v1/push
tempoHost: http://tempo-gateway.tempo/otlp
Expand Down Expand Up @@ -260,9 +264,16 @@ traces: # TODO: split this into 2 deployment to allow for tail based sampling. F
}
output {
metrics = [otelcol.exporter.otlphttp.local.input]
logs = [otelcol.exporter.otlphttp.local.input]
traces = [otelcol.exporter.otlphttp.local.input]
metrics = [otelcol.processor.batch.local.input]
logs = [otelcol.processor.batch.local.input]
traces = [otelcol.processor.batch.local.input]
}
}
otelcol.receiver.zipkin "local" {
endpoint = "0.0.0.0:9411"
output {
traces = [otelcol.processor.batch.local.input]
}
}
Expand Down
5 changes: 4 additions & 1 deletion istio/helm/istio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ istiod:
accessLogFile: /dev/stdout
accessLogFormat: |
[%START_TIME%] "%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %RESPONSE_CODE_DETAILS% %CONNECTION_TERMINATION_DETAILS% "%UPSTREAM_TRANSPORT_FAILURE_REASON%" %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% "%REQ(X-FORWARDED-FOR)%" "%REQ(USER-AGENT)%" "%REQ(X-REQUEST-ID)%" "%REQ(:AUTHORITY)%" "%UPSTREAM_HOST%" %UPSTREAM_CLUSTER% %UPSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_REMOTE_ADDRESS% %REQUESTED_SERVER_NAME% %ROUTE_NAME% traceID=%REQ(x-b3-traceid)%
# defaultConfig: # Needed for ambient mode
defaultConfig:
tracing:
sampling: 100.0
max_path_tag_length: 256
# proxyMetadata: # Needed for ambient mode
# ISTIO_META_ENABLE_HBONE: "true" # Needed for ambient mode

Expand Down
21 changes: 20 additions & 1 deletion istio/helm/istio/values.yaml.tpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
{{ $grafanaAgent := and .Configuration (index .Configuration "grafana-agent") }}
{{ $tempo := and .Configuration .Configuration.tempo }}

global:
istioNamespace: {{ namespace "istio" }}
{{/* {{- if and $grafanaAgent $tempo }}
tracer:
zipkin:
address:
{{- end }} */}}

{{- if chartInstalled "istio-cni" "istio-cni" }}
{{- if or (and $grafanaAgent $tempo) (chartInstalled "istio-cni" "istio-cni") }}
istiod:
{{- if and $grafanaAgent $tempo }}
{{ $grafanaAgentNamespace := namespace "grafana-agent" }}
meshConfig:
enableTracing: true
defaultConfig:
tracing:
zipkin:
address: grafana-agent-traces.{{ $grafanaAgentNamespace }}.svc:9411
{{- end }}
{{- if chartInstalled "istio-cni" "istio-cni" }}
istio_cni:
enabled: true
{{- end }}
{{- end }}
7 changes: 6 additions & 1 deletion kiali/helm/kiali/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ kiali-server:
- profile
istio_namespace: istio
server:
# address:
observability:
tracing:
collector_type: otel
sampling_rate: 1.0
otel:
protocol: http
web_port: 443
web_schema: https
web_root: /
Expand Down
9 changes: 9 additions & 0 deletions kiali/helm/kiali/values.yaml.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{- $monitoringNamespace := namespace "monitoring" -}}
{{- $mimir := and .Configuration .Configuration.mimir }}
{{ $grafanaAgent := and .Configuration (index .Configuration "grafana-agent") }}
{{ $tempo := and .Configuration .Configuration.tempo }}

global:
application:
Expand All @@ -12,6 +14,13 @@ virtualService:

kiali-server:
server:
{{- if and $grafanaAgent $tempo }}
{{ $grafanaAgentNamespace := namespace "grafana-agent" }}
observability:
tracing:
collector_url: grafana-agent-traces.{{ $grafanaAgentNamespace }}.svc:4318
enabled: true
{{- end }}
web_fqdn: {{ .Values.hostname }}
{{- if .OIDC }}
auth:
Expand Down

0 comments on commit 632c386

Please sign in to comment.