envoyproxy/envoy

Structured application logging for xDS internals

Open

#40.089 aperta il 1 lug 2025

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)C++ (5373 fork)batch import
area/xdsenhancementhelp wanted

Metriche repository

Star
 (27.997 star)
Metriche merge PR
 (Merge medio 8g) (378 PR mergiate in 30 g)

Descrizione

Emit application logs from Envoy to indicate when the xDS is effective. As was discussed early (#39891 ,https://github.com/envoyproxy/envoy/issues/35675, https://github.com/envoyproxy/envoy/issues/11396#issuecomment-3025014264), there is currently no reliable way to signal when Envoy effectively applied a given configuration without probing Envoy directly. To solve this, we propose to expose the internal workings of Envoy's xDS clients via OTLP event logging semantics. Concretely, we'd emit the following structured events via a configurable OTLP/stream endpoint (see log data model):

event_name: envoy.xds.applied
attributes:
  xds.type: listener | cluster
  xds.name: $(listener_name) | $(cluster_name) | ...
body: "Resource has been applied to all workers"

Note that we would emit xDS attributes as shared attributes rather than body per OTel semantic guidelines.

The work amounts to:

  • instrumenting the listener manager and the cluster manager with calls to log once the configuration is loaded onto all workers.
  • defining a new extension point for application event logs.
  • add log sinks to bootstrap and register common sinks such as Otel and stdout for dual use as an event log sink and an access log sink.

Guida contributor