accesslog: support CEL command (#26428)

Commit Message: accesslog: support CEL command in the formatter
Risk Level: low
Testing: unit
Docs Changes: none
Release Notes: yes

Mirrored from https://github.com/envoyproxy/envoy @ 8cfeabd5bd0b15b5e6ef029bf9fef4dcaa1c8254
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent a8940af37a
commit 325aafe857
  1. 1
      BUILD
  2. 9
      envoy/extensions/formatter/cel/v3/BUILD
  3. 34
      envoy/extensions/formatter/cel/v3/cel.proto
  4. 1
      versioning/BUILD

@ -232,6 +232,7 @@ proto_library(
"//envoy/extensions/filters/network/zookeeper_proxy/v3:pkg", "//envoy/extensions/filters/network/zookeeper_proxy/v3:pkg",
"//envoy/extensions/filters/udp/dns_filter/v3:pkg", "//envoy/extensions/filters/udp/dns_filter/v3:pkg",
"//envoy/extensions/filters/udp/udp_proxy/v3:pkg", "//envoy/extensions/filters/udp/udp_proxy/v3:pkg",
"//envoy/extensions/formatter/cel/v3:pkg",
"//envoy/extensions/formatter/metadata/v3:pkg", "//envoy/extensions/formatter/metadata/v3:pkg",
"//envoy/extensions/formatter/req_without_query/v3:pkg", "//envoy/extensions/formatter/req_without_query/v3:pkg",
"//envoy/extensions/health_checkers/redis/v3:pkg", "//envoy/extensions/health_checkers/redis/v3:pkg",

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,34 @@
syntax = "proto3";
package envoy.extensions.formatter.cel.v3;
import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.formatter.cel.v3";
option java_outer_classname = "CelProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/formatter/cel/v3;celv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Formatter extension for printing CEL expressions]
// [#extension: envoy.formatter.cel]
// CEL formatter extension implements CEL command operator that evaluates configured
// symbolic Common Expression Language expressions to generate an access log.
//
// See :ref:`here <config_access_log>` for more information on access log configuration.
// %CEL(EXPRESSION):Z%
// Expressions are based on the set of Envoy :ref:`attributes <arch_overview_attributes>`.
// Expression errors are considered `-`. Z is an optional parameter denoting string
// truncation up to Z characters long.
//
// Examples:
// - ``%CEL(response.code)%``
// - ``%CEL(connection.mtls)%``
// - ``%CEL(request.headers['x-envoy-original-path']):10%``
// - ``%CEL(request.headers['x-log-mtls'] || request.url_path.contains('v1beta3'))%``
// Configuration for the CEL formatter.
message Cel {
}

@ -170,6 +170,7 @@ proto_library(
"//envoy/extensions/filters/network/zookeeper_proxy/v3:pkg", "//envoy/extensions/filters/network/zookeeper_proxy/v3:pkg",
"//envoy/extensions/filters/udp/dns_filter/v3:pkg", "//envoy/extensions/filters/udp/dns_filter/v3:pkg",
"//envoy/extensions/filters/udp/udp_proxy/v3:pkg", "//envoy/extensions/filters/udp/udp_proxy/v3:pkg",
"//envoy/extensions/formatter/cel/v3:pkg",
"//envoy/extensions/formatter/metadata/v3:pkg", "//envoy/extensions/formatter/metadata/v3:pkg",
"//envoy/extensions/formatter/req_without_query/v3:pkg", "//envoy/extensions/formatter/req_without_query/v3:pkg",
"//envoy/extensions/health_checkers/redis/v3:pkg", "//envoy/extensions/health_checkers/redis/v3:pkg",

Loading…
Cancel
Save