...
1syntax = "proto3";
2
3package envoy.service.accesslog.v4alpha;
4
5import "envoy/config/core/v4alpha/base.proto";
6import "envoy/data/accesslog/v3/accesslog.proto";
7
8import "udpa/annotations/status.proto";
9import "udpa/annotations/versioning.proto";
10import "validate/validate.proto";
11
12option java_package = "io.envoyproxy.envoy.service.accesslog.v4alpha";
13option java_outer_classname = "AlsProto";
14option java_multiple_files = true;
15option java_generic_services = true;
16option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
17
18// [#protodoc-title: gRPC Access Log Service (ALS)]
19
20// Service for streaming access logs from Envoy to an access log server.
21service AccessLogService {
22 // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any
23 // response to be sent as nothing would be done in the case of failure. The server should
24 // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different
25 // API for "critical" access logs in which Envoy will buffer access logs for some period of time
26 // until it gets an ACK so it could then retry. This API is designed for high throughput with the
27 // expectation that it might be lossy.
28 rpc StreamAccessLogs(stream StreamAccessLogsMessage) returns (StreamAccessLogsResponse) {
29 }
30}
31
32// Empty response for the StreamAccessLogs API. Will never be sent. See below.
33message StreamAccessLogsResponse {
34 option (udpa.annotations.versioning).previous_message_type =
35 "envoy.service.accesslog.v3.StreamAccessLogsResponse";
36}
37
38// Stream message for the StreamAccessLogs API. Envoy will open a stream to the server and stream
39// access logs without ever expecting a response.
40message StreamAccessLogsMessage {
41 option (udpa.annotations.versioning).previous_message_type =
42 "envoy.service.accesslog.v3.StreamAccessLogsMessage";
43
44 message Identifier {
45 option (udpa.annotations.versioning).previous_message_type =
46 "envoy.service.accesslog.v3.StreamAccessLogsMessage.Identifier";
47
48 // The node sending the access log messages over the stream.
49 config.core.v4alpha.Node node = 1 [(validate.rules).message = {required: true}];
50
51 // The friendly name of the log configured in :ref:`CommonGrpcAccessLogConfig
52 // <envoy_api_msg_extensions.access_loggers.grpc.v4alpha.CommonGrpcAccessLogConfig>`.
53 string log_name = 2 [(validate.rules).string = {min_len: 1}];
54 }
55
56 // Wrapper for batches of HTTP access log entries.
57 message HTTPAccessLogEntries {
58 option (udpa.annotations.versioning).previous_message_type =
59 "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries";
60
61 repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1
62 [(validate.rules).repeated = {min_items: 1}];
63 }
64
65 // Wrapper for batches of TCP access log entries.
66 message TCPAccessLogEntries {
67 option (udpa.annotations.versioning).previous_message_type =
68 "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries";
69
70 repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1
71 [(validate.rules).repeated = {min_items: 1}];
72 }
73
74 // Identifier data that will only be sent in the first message on the stream. This is effectively
75 // structured metadata and is a performance optimization.
76 Identifier identifier = 1;
77
78 // Batches of log entries of a single type. Generally speaking, a given stream should only
79 // ever include one type of log entry.
80 oneof log_entries {
81 option (validate.required) = true;
82
83 HTTPAccessLogEntries http_logs = 2;
84
85 TCPAccessLogEntries tcp_logs = 3;
86 }
87}
View as plain text