als.proto 3.6 KB

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