envoyproxy / envoyproxy/envoy

Structured application logging for xDS internals

Open
#40,089 2 comments 0 reactions 0 assignees View on GitHub
area/xds enhancement help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 22h
Merged PRs (30d)
430

Description

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](https://opentelemetry.io/docs/specs/otel/logs/data-model/)):

```yaml
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.