Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4df069e
access logging: introduce critical ALS endpoint
Shikugawa Jul 26, 2021
daa2f41
wip
Shikugawa Jul 28, 2021
a63ec67
wip
Shikugawa Jul 29, 2021
37a1e18
timer
Shikugawa Jul 29, 2021
8f51ae2
wip
Shikugawa Aug 2, 2021
5ed729f
test
Shikugawa Aug 2, 2021
6fbaa22
tinyfix
Shikugawa Aug 2, 2021
4110cc7
fix api
Shikugawa Aug 4, 2021
c1d448a
add buffer limit
Shikugawa Aug 4, 2021
69773e4
fix
Shikugawa Aug 4, 2021
35dd187
refactor
Shikugawa Aug 4, 2021
e506fd6
fix build
Shikugawa Aug 5, 2021
d94bcee
fix
Shikugawa Aug 6, 2021
75eb0bd
add docs
Shikugawa Aug 16, 2021
e34e5ff
Merge branch 'main' into als-fatal
Shikugawa Aug 16, 2021
d432070
Merge branch 'main' of https://github.com/envoyproxy/envoy into als-f…
Shikugawa Aug 23, 2021
824aa2a
docs
Shikugawa Aug 23, 2021
9022520
fix
Shikugawa Aug 25, 2021
7e95cb6
fix
Shikugawa Aug 25, 2021
70c589a
not to generate v4alpha
Shikugawa Aug 27, 2021
444dd61
tmp
Shikugawa Sep 2, 2021
6c4cb60
api review
Shikugawa Sep 2, 2021
ee43245
fix
Shikugawa Sep 2, 2021
9d7e6d9
fix
Shikugawa Sep 2, 2021
1a72c4e
tmp
Shikugawa Sep 4, 2021
f6ce0f2
tmp
Shikugawa Sep 6, 2021
263c015
tmp
Shikugawa Sep 6, 2021
1b9991d
test: fix corner-case for waiting stats change utility on integration…
Shikugawa Sep 6, 2021
8bf0872
fix
Shikugawa Sep 6, 2021
76ee0ca
fix
Shikugawa Sep 6, 2021
9b88364
fix build
Shikugawa Sep 6, 2021
8ada51f
tidy
Shikugawa Sep 7, 2021
a400410
grpc: implement BufferedAsyncClient for bidi gRPC stream
Shikugawa Sep 15, 2021
a5a27a3
tmp
Shikugawa Sep 15, 2021
7cfdf0f
fix
Shikugawa Sep 15, 2021
0793deb
fix
Shikugawa Sep 15, 2021
599b05a
fix
Shikugawa Sep 15, 2021
6c43c6c
fix
Shikugawa Sep 15, 2021
44dd7ef
fix
Shikugawa Sep 15, 2021
b7c409e
fix
Shikugawa Sep 15, 2021
f6b9451
fix
Shikugawa Sep 16, 2021
6f673a1
fix
Shikugawa Sep 16, 2021
14e8ad7
fix
Shikugawa Sep 22, 2021
8591511
fix
Shikugawa Sep 22, 2021
1cf0c86
fix conflict
Shikugawa Nov 12, 2021
65e2d41
fix
Shikugawa Nov 12, 2021
3feffd8
fix
Shikugawa Nov 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/envoy/extensions/access_loggers/grpc/v3/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2

api_proto_package(
deps = [
"//envoy/config/accesslog/v3:pkg",
"//envoy/config/core/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
Expand Down
22 changes: 21 additions & 1 deletion api/envoy/extensions/access_loggers/grpc/v3/als.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";

package envoy.extensions.access_loggers.grpc.v3;

import "envoy/config/accesslog/v3/accesslog.proto";
import "envoy/config/core/v3/config_source.proto";
import "envoy/config/core/v3/grpc_service.proto";

Expand Down Expand Up @@ -54,7 +55,7 @@ message TcpGrpcAccessLogConfig {
}

// Common configuration for gRPC access logs.
// [#next-free-field: 7]
// [#next-free-field: 9]
message CommonGrpcAccessLogConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.accesslog.v2.CommonGrpcAccessLogConfig";
Expand Down Expand Up @@ -86,4 +87,23 @@ message CommonGrpcAccessLogConfig {
// <envoy_v3_api_field_data.accesslog.v3.AccessLogCommon.filter_state_objects>`.
// Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object.
repeated string filter_state_objects_to_log = 5;

// Define the log condition as a filter to ensure that the destination is reached.
Comment thread
Shikugawa marked this conversation as resolved.
Outdated
// Logs that match the filter are not forwarded to the normal endpoint,
Comment thread
Shikugawa marked this conversation as resolved.
Outdated
// but are sent to a special endpoint. This endpoint will return ACK/NACK as a response,
// and Envoy will perform buffering upon receiving a NACK. The buffered message is
// resend until it is reached. Failure to send here means that
//
// 1. when a NACK message corresponding to the message sent is received
// 2. when the ACK message corresponding to the sent message buffer could not be
// received until the message_ack_timeout is reached.
Comment thread
Shikugawa marked this conversation as resolved.
Outdated
//
// It is recommended to set a strict filter because setting a loose filter here may cause
// extreme pressure on the Envoy buffer in cases where the log aggregation cluster is repeatedly restarted.
config.accesslog.v3.AccessLogFilter buffer_log_filter = 7
[(validate.rules).enum = {defined_only: true}];

// The time to wait for an ACK message. If no ACK message is returned after this time,
// the message is considered undeliverable and the failed transmission is buffered again.
Comment thread
htuch marked this conversation as resolved.
google.protobuf.Duration message_ack_timeout = 8 [(validate.rules).duration = {gt {}}];
}
1 change: 1 addition & 0 deletions api/envoy/extensions/access_loggers/grpc/v4alpha/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2

api_proto_package(
deps = [
"//envoy/config/accesslog/v4alpha:pkg",
"//envoy/config/core/v4alpha:pkg",
"//envoy/extensions/access_loggers/grpc/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
Expand Down
22 changes: 21 additions & 1 deletion api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";

package envoy.extensions.access_loggers.grpc.v4alpha;

import "envoy/config/accesslog/v4alpha/accesslog.proto";
import "envoy/config/core/v4alpha/config_source.proto";
import "envoy/config/core/v4alpha/grpc_service.proto";

Expand Down Expand Up @@ -54,7 +55,7 @@ message TcpGrpcAccessLogConfig {
}

// Common configuration for gRPC access logs.
// [#next-free-field: 7]
// [#next-free-field: 9]
message CommonGrpcAccessLogConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig";
Expand Down Expand Up @@ -86,4 +87,23 @@ message CommonGrpcAccessLogConfig {
// <envoy_v3_api_field_data.accesslog.v3.AccessLogCommon.filter_state_objects>`.
// Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object.
repeated string filter_state_objects_to_log = 5;

// Define the log condition as a filter to ensure that the destination is reached.
// Logs that match the filter are not forwarded to the normal endpoint,
// but are sent to a special endpoint. This endpoint will return ACK/NACK as a response,
// and Envoy will perform buffering upon receiving a NACK. The buffered message is
// resend until it is reached. Failure to send here means that
//
// 1. when a NACK message corresponding to the message sent is received
// 2. when the ACK message corresponding to the sent message buffer could not be
// received until the message_ack_timeout is reached.
//
// It is recommended to set a strict filter because setting a loose filter here may cause
// extreme pressure on the Envoy buffer in cases where the log aggregation cluster is repeatedly restarted.
config.accesslog.v4alpha.AccessLogFilter buffer_log_filter = 7
[(validate.rules).enum = {defined_only: true}];

// The time to wait for an ACK message. If no ACK message is returned after this time,
// the message is considered undeliverable and the failed transmission is buffered again.
google.protobuf.Duration message_ack_timeout = 8 [(validate.rules).duration = {gt {}}];
}
18 changes: 18 additions & 0 deletions api/envoy/service/accesslog/v3/als.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ service AccessLogService {
// expectation that it might be lossy.
rpc StreamAccessLogs(stream StreamAccessLogsMessage) returns (StreamAccessLogsResponse) {
}

rpc BufferedCriticalAccessLogs(StreamAccessLogsMessage)
Comment thread
Shikugawa marked this conversation as resolved.
Outdated
returns (BufferedCriticalAccessLogsResponse) {
}
}

// Empty response for the StreamAccessLogs API. Will never be sent. See below.
Expand All @@ -35,6 +39,20 @@ message StreamAccessLogsResponse {
"envoy.service.accesslog.v2.StreamAccessLogsResponse";
}

// Response received to identify undelivered or delivered messages in BufferedCriticalAccessLogs.
message BufferedCriticalAccessLogsResponse {
enum Status {
// Indicates that the message has been received.
ACK = 0;

// Indicates that the message has not been received.
NACK = 1;
}

// This field is used to indicate the arrival status.
Status status = 1;
}

// Stream message for the StreamAccessLogs API. Envoy will open a stream to the server and stream
// access logs without ever expecting a response.
message StreamAccessLogsMessage {
Expand Down
21 changes: 21 additions & 0 deletions api/envoy/service/accesslog/v4alpha/als.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ service AccessLogService {
// expectation that it might be lossy.
rpc StreamAccessLogs(stream StreamAccessLogsMessage) returns (StreamAccessLogsResponse) {
}

rpc BufferedCriticalAccessLogs(StreamAccessLogsMessage)
returns (BufferedCriticalAccessLogsResponse) {
}
}

// Empty response for the StreamAccessLogs API. Will never be sent. See below.
Expand All @@ -35,6 +39,23 @@ message StreamAccessLogsResponse {
"envoy.service.accesslog.v3.StreamAccessLogsResponse";
}

// Response received to identify undelivered or delivered messages in BufferedCriticalAccessLogs.
message BufferedCriticalAccessLogsResponse {
option (udpa.annotations.versioning).previous_message_type =
"envoy.service.accesslog.v3.BufferedCriticalAccessLogsResponse";

enum Status {
// Indicates that the message has been received.
ACK = 0;

// Indicates that the message has not been received.
NACK = 1;
}

// This field is used to indicate the arrival status.
Status status = 1;
}

// Stream message for the StreamAccessLogs API. Envoy will open a stream to the server and stream
// access logs without ever expecting a response.
message StreamAccessLogsMessage {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions generated_api_shadow/envoy/service/accesslog/v3/als.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions source/extensions/access_loggers/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,7 @@ envoy_cc_library(
"//source/common/protobuf:utility_lib",
"@com_google_absl//absl/types:optional",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/extensions/access_loggers/grpc/v3:pkg_cc_proto",
"@envoy_api//envoy/service/accesslog/v3:pkg_cc_proto",
],
)
Loading