accesslogs: add CEL-based extension filter (#18363)
This PR establishes the ability to filter access log production via CEL expressions over the set of Envoy attributes. This can simply the creation of Envoy access log filters, allowing complex tailoring. Risk Level: low Testing: unit Docs Changes: included Release Notes: updated Signed-off-by: Douglas Reid <douglas-reid@users.noreply.github.com> Mirrored from https://github.com/envoyproxy/envoy @ 77ca6cc0d9aaf0892aec3e2025fe2ad7cf0c39ffpull/626/head
parent
e1750f70ad
commit
7d75b5e8f2
5 changed files with 38 additions and 0 deletions
@ -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,26 @@ |
|||||||
|
syntax = "proto3"; |
||||||
|
|
||||||
|
package envoy.extensions.access_loggers.filters.cel.v3; |
||||||
|
|
||||||
|
import "udpa/annotations/status.proto"; |
||||||
|
|
||||||
|
option java_package = "io.envoyproxy.envoy.extensions.access_loggers.filters.cel.v3"; |
||||||
|
option java_outer_classname = "CelProto"; |
||||||
|
option java_multiple_files = true; |
||||||
|
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||||
|
|
||||||
|
// [#protodoc-title: ExpressionFilter] |
||||||
|
// [#extension: envoy.access_loggers.extension_filters.cel] |
||||||
|
|
||||||
|
// ExpressionFilter is an access logging filter that evaluates configured |
||||||
|
// symbolic Common Expression Language expressions to inform the decision |
||||||
|
// to generate an access log. |
||||||
|
message ExpressionFilter { |
||||||
|
// Expression that, when evaluated, will be used to filter access logs. |
||||||
|
// Expressions are based on the set of Envoy :ref:`attributes <arch_overview_attributes>`. |
||||||
|
// The provided expression must evaluate to true for logging (expression errors are considered false). |
||||||
|
// Examples: |
||||||
|
// - `response.code >= 400` |
||||||
|
// - `(connection.mtls && request.headers['x-log-mtls'] == 'true') || request.url_path.contains('v1beta3')` |
||||||
|
string expression = 1; |
||||||
|
} |
Loading…
Reference in new issue