OpenTelemetry Access Log (proto)
extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig
[extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig proto]
Configuration for the built-in envoy.access_loggers.open_telemetry
AccessLog. This configuration will
populate opentelemetry.proto.collector.v1.logs.ExportLogsServiceRequest.resource_logs.
In addition, the request start time is set in the dedicated field.
This extension has the qualified name envoy.access_loggers.open_telemetry
Note
This extension is intended to be robust against untrusted downstream traffic. It assumes that the upstream is trusted.
Tip
This extension extends and can be used with the following extension category:
This extension must be configured with one of the following type URLs:
{
"common_config": {...},
"http_service": {...},
"grpc_service": {...},
"disable_builtin_labels": ...,
"resource_attributes": {...},
"body": {...},
"attributes": {...},
"stat_prefix": ...,
"formatters": [],
"log_name": ...,
"buffer_flush_interval": {...},
"buffer_size_bytes": {...},
"filter_state_objects_to_log": [],
"custom_tags": []
}
- common_config
(extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig) Deprecated. Use
grpc_serviceorhttp_serviceinstead.
- http_service
(config.core.v3.HttpService) The upstream HTTP cluster that will receive OTLP logs via OTLP/HTTP. Note: Only one of
common_config,grpc_service, orhttp_servicemay be used.Note
The
request_headers_to_addproperty in the OTLP HTTP exporter service does not support the format specifier as used for HTTP access logging. The values configured are added as HTTP headers on the OTLP export request without any formatting applied.
- grpc_service
(config.core.v3.GrpcService) The upstream gRPC cluster that will receive OTLP logs. Note: Only one of
common_config,grpc_service, orhttp_servicemay be used. This field is preferred overcommon_config.grpc_service.
- disable_builtin_labels
(bool) If specified, Envoy will not generate built-in resource labels like
log_name,zone_name,cluster_name,node_name.
- resource_attributes
(.opentelemetry.proto.common.v1.KeyValueList) OpenTelemetry Resource attributes are filled with Envoy node info. Example:
resource_attributes { values { key: "region" value { string_value: "cn-north-7" } } }.
- body
(.opentelemetry.proto.common.v1.AnyValue) OpenTelemetry LogResource fields, following Envoy access logging formatting.
See ‘body’ in the LogResource proto for more details. Example:
body { string_value: "%PROTOCOL%" }.
- attributes
(.opentelemetry.proto.common.v1.KeyValueList) See ‘attributes’ in the LogResource proto for more details. Example:
attributes { values { key: "user_agent" value { string_value: "%REQ(USER-AGENT)%" } } }.
- stat_prefix
(string) Optional. Additional prefix to use on OpenTelemetry access logger stats. If empty, the stats will be rooted at
access_logs.open_telemetry_access_log.. If non-empty, stats will be rooted ataccess_logs.open_telemetry_access_log.<stat_prefix>..
- formatters
(repeated config.core.v3.TypedExtensionConfig) Specifies a collection of Formatter plugins that can be called from the access log configuration. See the formatters extensions documentation for details.
Tip
This extension category has the following known extensions:
- log_name
(string)
- buffer_flush_interval
(Duration) The interval for flushing access logs to the transport. Default: 1 second.
- buffer_size_bytes
(UInt32Value) Soft size limit in bytes for the access log buffer. When the buffer exceeds this limit, logs will be flushed. Default: 16KB.
- filter_state_objects_to_log
(repeated string) Additional filter state objects to log as attributes.
- custom_tags
(repeated type.tracing.v3.CustomTag) Custom tags to include as log attributes.