OpenTelemetry (gRPC) 訪問日誌 (proto)

extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig

[extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig proto]

內建 envoy.access_loggers.open_telemetry AccessLog 的組態。此組態將會填入 opentelemetry.proto.collector.v1.logs.ExportLogsServiceRequest.resource_logs。此外,請求開始時間會設定在專用欄位中。

此擴充功能的合格名稱為 envoy.access_loggers.open_telemetry

注意

此擴充功能旨在針對不受信任的下游流量具有強健性。它假設上游是受信任的。

提示

此擴充功能擴展了以下擴充功能類別,並且可以與之一起使用

此擴充功能必須使用下列其中一個類型 URL 進行組態

{
  "common_config": {...},
  "disable_builtin_labels": ...,
  "resource_attributes": {...},
  "body": {...},
  "attributes": {...},
  "stat_prefix": ...,
  "formatters": []
}
common_config

(extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig必要)

disable_builtin_labels

(bool) 如果指定,Envoy 將不會產生內建的資源標籤,例如 log_namezone_namecluster_namenode_name

resource_attributes

(.opentelemetry.proto.common.v1.KeyValueList) OpenTelemetry 資源屬性會填入 Envoy 節點資訊。範例: resource_attributes { values { key: "region" value { string_value: "cn-north-7" } } }

body

(.opentelemetry.proto.common.v1.AnyValue) OpenTelemetry LogResource 欄位,遵循 Envoy 存取日誌記錄格式

請參閱 LogResource proto 中的「body」以取得更多詳細資訊。範例: body { string_value: "%PROTOCOL%" }

attributes

(.opentelemetry.proto.common.v1.KeyValueList) 請參閱 LogResource proto 中的「attributes」以取得更多詳細資訊。範例: attributes { values { key: "user_agent" value { string_value: "%REQ(USER-AGENT)%" } } }

stat_prefix

(string) 選用。用於 OpenTelemetry 存取日誌記錄器統計資訊的其他前綴。如果為空,統計資訊將會以 access_logs.open_telemetry_access_log. 為根。如果非空,統計資訊將會以 access_logs.open_telemetry_access_log.<stat_prefix>. 為根。

formatters

(重複 config.core.v3.TypedExtensionConfig) 指定可以從存取日誌組態中呼叫的格式器外掛程式集合。如需詳細資訊,請參閱格式器擴充功能文件。

提示

此擴充功能類別具有下列已知的擴充功能