3 min • read

Log service

By default, Ambassador Edge Stack puts the access logs on stdout; such that the can be read using kubectl logs. The format of those logs, and the local destination of them, can be configured using the envoy_log_ settings in the ambassador Module. However, the options there only allow for logging local to Ambassador Edge Stack's Pod. By configuring a LogService, you can configure Ambassador Edge Stack to report its access logs to a remote service, in addition to the usual ambassador Module configured logging.

The remote access log service (or ALS) must implement the AccessLogService gRPC interface, defined in Envoy's als.proto.

  • service is where to route the access log gRPC requests to

  • driver identifies which type of accesses to log; HTTP requests ("http") or TLS connections ("tcp").

  • driver_config stores the configuration that is specific to the driver:

    • driver: tcp has no additional configuration; the config must be set as driver_config: {}.

    • driver: http

      • additional_log_headers identifies HTTP headers to include in the access log, and when in the logged-request's lifecycle to include them.
  • flush_interval_time is the maximum number of seconds to buffer accesses for before sending them to the ALS. The logs will be flushed to the ALS every time this duration is reached, or when the buffered data reaches flush_interval_byte_size, whichever comes first. See the Envoy documentation on buffer_flush_interval for more information.

  • flush_interval_byte_size is a soft size limit for the access log buffer. The logs will be flushed to the ALS every time the buffered data reaches this size, or whenever flush_interval_time elapses, whichever comes first. See the Envoy documentation on buffer_size_bytes for more information.

  • grpc must be true.

Example