Skip to content

Commit

Permalink
improvement CEL doc (envoyproxy#31487)
Browse files Browse the repository at this point in the history
* improvement CEL formatter doc

Signed-off-by: zirain <[email protected]>

* more page

Signed-off-by: zirain <[email protected]>

* lint

Signed-off-by: zirain <[email protected]>

---------

Signed-off-by: zirain <[email protected]>
  • Loading branch information
zirain authored Dec 22, 2023
1 parent 82da331 commit 55b942a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions api/envoy/extensions/access_loggers/filters/cel/v3/cel.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ message ExpressionFilter {
// 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')``
//
// * ``response.code >= 400``
// * ``(connection.mtls && request.headers['x-log-mtls'] == 'true') || request.url_path.contains('v1beta3')``
string expression = 1;
}
9 changes: 5 additions & 4 deletions api/envoy/extensions/formatter/cel/v3/cel.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// 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'))%``
//
// * ``%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 {
Expand Down

0 comments on commit 55b942a

Please sign in to comment.