als.proto 2.9 KB

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