api: promote tracing operation to listener level (#7723)

Promote tracing operation field to listener level. This expands the scope of the field to support two use cases:

Tracing TCP connections: istio can send connection events to create a service communication graph. Network filters can benefit from the common knowledge about the intent of the listener/filter chain (client-side vs server-side).
Using ingress/egress designation for other telemetry. The direction of the traffic is a useful label on metrics, and it is not explicit at the moment, unless depending on tracing configuration in HTTP connection manager or naming convention. Both workarounds are not ideal.

Risk Level: low
Testing: all unit tests continue to pass

Signed-off-by: Kuat Yessenov <kuat@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ ca2af9723598fab4f511b59407396cc5cff9ed94
pull/620/head
data-plane-api(CircleCI) 5 years ago
parent cb1025586d
commit ce594d9b54
  1. 12
      envoy/api/v2/core/base.proto
  2. 5
      envoy/api/v2/lds.proto
  3. 1
      envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto

@ -278,3 +278,15 @@ message ControlPlane {
// the Envoy is connected to. // the Envoy is connected to.
string identifier = 1; string identifier = 1;
} }
// Identifies the direction of the traffic relative to the local Envoy.
enum TrafficDirection {
// Default option is unspecified.
UNSPECIFIED = 0;
// The transport is used for incoming traffic.
INBOUND = 1;
// The transport is used for outgoing traffic.
OUTBOUND = 2;
}

@ -44,7 +44,7 @@ service ListenerDiscoveryService {
} }
} }
// [#comment:next free field: 16] // [#comment:next free field: 17]
message Listener { message Listener {
// The unique name by which this listener is known. If no name is provided, // The unique name by which this listener is known. If no name is provided,
// Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically // Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically
@ -181,4 +181,7 @@ message Listener {
google.protobuf.UInt32Value tcp_fast_open_queue_length = 12; google.protobuf.UInt32Value tcp_fast_open_queue_length = 12;
reserved 14; reserved 14;
// Specifies the intended direction of the traffic relative to the local Envoy.
core.TrafficDirection traffic_direction = 16;
} }

@ -80,6 +80,7 @@ message HttpConnectionManager {
google.protobuf.BoolValue add_user_agent = 6; google.protobuf.BoolValue add_user_agent = 6;
message Tracing { message Tracing {
// [#comment:TODO(kyessenov): Align this field with listener traffic direction field.]
enum OperationName { enum OperationName {
option (gogoproto.goproto_enum_prefix) = false; option (gogoproto.goproto_enum_prefix) = false;

Loading…
Cancel
Save