This task tracks configuring envoy to send traces to otel-collector (within k8s).
Immediate TODO (could be done concurrently too)
== Envoy ==
* [ ] Identify which Envoys we're targeting (e.g. tls terminator, mesh, etc) and what service/namespace
* [ ] Figure out how to expose/inject the current node address into the envoy config (likely via env variables, obtained via `spec.nodeName` via the k8s downward API)
* [ ] Add the otelcol to the envoy(s) above's `clusters` (via flags in `mesh` module `configuration*.tpl`)
```lang=yaml
- name: opentelemetry_collector
type: STRICT_DNS
lb_policy: ROUND_ROBIN
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
explicit_http_config:
http2_protocol_options: {}
load_assignment:
cluster_name: opentelemetry_collector
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: node's address?
port_value: 4317
```
* [ ] Instruct envoy's http manager to send traces via said cluster (via flags in `mesh` module `configuration*.tpl`)
```lang=yaml
tracing:
provider:
name: envoy.tracers.opentelemetry
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v3.OpenTelemetryConfig
grpc_service:
envoy_grpc:
cluster_name: opentelemetry_collector
timeout: 0.250s
service_name: front-envoy
```
== otelcol ==
* [ ] While T344253 and T343302 are in progress, we should consider enabling `zpages` extension on otelcol so we can inspect the received traces without requiring jaeger