Common access log types

config.filter.accesslog.v2.AccessLog

[config.filter.accesslog.v2.AccessLog proto]

{
  "name": "...",
  "filter": "{...}",
  "config": "{...}",
  "typed_config": "{...}"
}
name

(string) The name of the access log implementation to instantiate. The name must match a statically registered access log. Current built-in loggers include:

  1. “envoy.access_loggers.file”

  2. “envoy.access_loggers.http_grpc”

  3. “envoy.access_loggers.tcp_grpc”

filter

(config.filter.accesslog.v2.AccessLogFilter) Filter which is used to determine if the access log needs to be written.

config

(Struct) Custom configuration that depends on the access log being instantiated. Built-in configurations include:

  1. “envoy.access_loggers.file”: FileAccessLog

  2. “envoy.access_loggers.http_grpc”: HttpGrpcAccessLogConfig

  3. “envoy.access_loggers.tcp_grpc”: TcpGrpcAccessLogConfig

Only one of config, typed_config may be set.

typed_config

(Any) Custom configuration that depends on the access log being instantiated. Built-in configurations include:

  1. “envoy.access_loggers.file”: FileAccessLog

  2. “envoy.access_loggers.http_grpc”: HttpGrpcAccessLogConfig

  3. “envoy.access_loggers.tcp_grpc”: TcpGrpcAccessLogConfig

Only one of config, typed_config may be set.

config.filter.accesslog.v2.AccessLogFilter

[config.filter.accesslog.v2.AccessLogFilter proto]

{
  "status_code_filter": "{...}",
  "duration_filter": "{...}",
  "not_health_check_filter": "{...}",
  "traceable_filter": "{...}",
  "runtime_filter": "{...}",
  "and_filter": "{...}",
  "or_filter": "{...}",
  "header_filter": "{...}",
  "response_flag_filter": "{...}",
  "grpc_status_filter": "{...}",
  "extension_filter": "{...}"
}
status_code_filter

(config.filter.accesslog.v2.StatusCodeFilter) Status code filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

duration_filter

(config.filter.accesslog.v2.DurationFilter) Duration filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

not_health_check_filter

(config.filter.accesslog.v2.NotHealthCheckFilter) Not health check filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

traceable_filter

(config.filter.accesslog.v2.TraceableFilter) Traceable filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

runtime_filter

(config.filter.accesslog.v2.RuntimeFilter) Runtime filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

and_filter

(config.filter.accesslog.v2.AndFilter) And filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

or_filter

(config.filter.accesslog.v2.OrFilter) Or filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

header_filter

(config.filter.accesslog.v2.HeaderFilter) Header filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

response_flag_filter

(config.filter.accesslog.v2.ResponseFlagFilter) Response flag filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

grpc_status_filter

(config.filter.accesslog.v2.GrpcStatusFilter) gRPC status filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

extension_filter

(config.filter.accesslog.v2.ExtensionFilter) Extension filter.

Precisely one of status_code_filter, duration_filter, not_health_check_filter, traceable_filter, runtime_filter, and_filter, or_filter, header_filter, response_flag_filter, grpc_status_filter, extension_filter must be set.

config.filter.accesslog.v2.ComparisonFilter

[config.filter.accesslog.v2.ComparisonFilter proto]

Filter on an integer comparison.

{
  "op": "...",
  "value": "{...}"
}
op

(config.filter.accesslog.v2.ComparisonFilter.Op) Comparison operator.

value

(core.RuntimeUInt32) Value to compare against.

Enum config.filter.accesslog.v2.ComparisonFilter.Op

[config.filter.accesslog.v2.ComparisonFilter.Op proto]

EQ

(DEFAULT) ⁣=

GE

⁣>=

LE

⁣<=

config.filter.accesslog.v2.StatusCodeFilter

[config.filter.accesslog.v2.StatusCodeFilter proto]

Filters on HTTP response/status code.

{
  "comparison": "{...}"
}
comparison

(config.filter.accesslog.v2.ComparisonFilter, REQUIRED) Comparison.

config.filter.accesslog.v2.DurationFilter

[config.filter.accesslog.v2.DurationFilter proto]

Filters on total request duration in milliseconds.

{
  "comparison": "{...}"
}
comparison

(config.filter.accesslog.v2.ComparisonFilter, REQUIRED) Comparison.

config.filter.accesslog.v2.NotHealthCheckFilter

[config.filter.accesslog.v2.NotHealthCheckFilter proto]

Filters for requests that are not health check requests. A health check request is marked by the health check filter.

{}

config.filter.accesslog.v2.TraceableFilter

[config.filter.accesslog.v2.TraceableFilter proto]

Filters for requests that are traceable. See the tracing overview for more information on how a request becomes traceable.

{}

config.filter.accesslog.v2.RuntimeFilter

[config.filter.accesslog.v2.RuntimeFilter proto]

Filters for random sampling of requests.

{
  "runtime_key": "...",
  "percent_sampled": "{...}",
  "use_independent_randomness": "..."
}
runtime_key

(string, REQUIRED) Runtime key to get an optional overridden numerator for use in the percent_sampled field. If found in runtime, this value will replace the default numerator.

percent_sampled

(type.FractionalPercent) The default sampling percentage. If not specified, defaults to 0% with denominator of 100.

use_independent_randomness

(bool) By default, sampling pivots on the header x-request-id being present. If x-request-id is present, the filter will consistently sample across multiple hosts based on the runtime key value and the value extracted from x-request-id. If it is missing, or use_independent_randomness is set to true, the filter will randomly sample based on the runtime key value alone. use_independent_randomness can be used for logging kill switches within complex nested AndFilter and OrFilter blocks that are easier to reason about from a probability perspective (i.e., setting to true will cause the filter to behave like an independent random variable when composed within logical operator filters).

config.filter.accesslog.v2.AndFilter

[config.filter.accesslog.v2.AndFilter proto]

Performs a logical “and” operation on the result of each filter in filters. Filters are evaluated sequentially and if one of them returns false, the filter returns false immediately.

{
  "filters": []
}
filters

(config.filter.accesslog.v2.AccessLogFilter, REQUIRED)

config.filter.accesslog.v2.OrFilter

[config.filter.accesslog.v2.OrFilter proto]

Performs a logical “or” operation on the result of each individual filter. Filters are evaluated sequentially and if one of them returns true, the filter returns true immediately.

{
  "filters": []
}
filters

(config.filter.accesslog.v2.AccessLogFilter, REQUIRED)

config.filter.accesslog.v2.HeaderFilter

[config.filter.accesslog.v2.HeaderFilter proto]

Filters requests based on the presence or value of a request header.

{
  "header": "{...}"
}
header

(route.HeaderMatcher, REQUIRED) Only requests with a header which matches the specified HeaderMatcher will pass the filter check.

config.filter.accesslog.v2.ResponseFlagFilter

[config.filter.accesslog.v2.ResponseFlagFilter proto]

Filters requests that received responses with an Envoy response flag set. A list of the response flags can be found in the access log formatter documentation.

{
  "flags": []
}
flags

(string) Only responses with the any of the flags listed in this field will be logged. This field is optional. If it is not specified, then any response flag will pass the filter check.

config.filter.accesslog.v2.GrpcStatusFilter

[config.filter.accesslog.v2.GrpcStatusFilter proto]

Filters gRPC requests based on their response status. If a gRPC status is not provided, the filter will infer the status from the HTTP status code.

{
  "statuses": [],
  "exclude": "..."
}
statuses

(config.filter.accesslog.v2.GrpcStatusFilter.Status) Logs only responses that have any one of the gRPC statuses in this field.

exclude

(bool) If included and set to true, the filter will instead block all responses with a gRPC status or inferred gRPC status enumerated in statuses, and allow all other responses.

Enum config.filter.accesslog.v2.GrpcStatusFilter.Status

[config.filter.accesslog.v2.GrpcStatusFilter.Status proto]

OK

(DEFAULT)

CANCELED

UNKNOWN

INVALID_ARGUMENT

DEADLINE_EXCEEDED

NOT_FOUND

ALREADY_EXISTS

PERMISSION_DENIED

RESOURCE_EXHAUSTED

FAILED_PRECONDITION

ABORTED

OUT_OF_RANGE

UNIMPLEMENTED

INTERNAL

UNAVAILABLE

DATA_LOSS

UNAUTHENTICATED

config.filter.accesslog.v2.ExtensionFilter

[config.filter.accesslog.v2.ExtensionFilter proto]

Extension filter is statically registered at runtime.

{
  "name": "...",
  "config": "{...}",
  "typed_config": "{...}"
}
name

(string) The name of the filter implementation to instantiate. The name must match a statically registered filter.

config

(Struct) Custom configuration that depends on the filter being instantiated.

Only one of config, typed_config may be set.

typed_config

(Any) Custom configuration that depends on the filter being instantiated.

Only one of config, typed_config may be set.