-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Title: HTTP PATCH logged as METHOD_UNSPECIFIED when logging with ALS
Description:
I use PATCH requests that go through envoy and logs are written with als implemented on golang. I expect to see "PATCH" as a result of this code:
Instead, I see "METHOD_UNSPECIFIED".
When I tried to find the reason in the library code, I found that PATCH is not in the list of request methods in base.proto (which is used in the library)
https://github.com/envoyproxy/envoy/blob/3cb3571f093602b7d6a06945906802666febcf66/api/envoy/api/v2/core/base.proto
However, if I don't use ALS and let envoy log requests, PATCH is written as expected.
I created an issue in the go-control-plane and they advised to ask here: envoyproxy/go-control-plane#176
Repro steps:
golang sample:
import (
envoy "github.com/envoyproxy/go-control-plane/envoy/data/accesslog/v2"
)
func RequestMethod(ent *envoy.HTTPAccessLogEntry) string {
return ent.GetRequest().GetRequestMethod().String()
}
Config:
access_log:
- name: envoy.http_grpc_access_log
config:
common_config:
log_name: access_log
grpc_service: { envoy_grpc: { cluster_name: als } }
additional_request_headers_to_log: []
additional_response_headers_to_log: []
additional_response_trailers_to_log: []
- name: als
connect_timeout: 0.25s
http2_protocol_options: {}
common_http_protocol_options:
idle_timeout: 30s
upstream_connection_options:
tcp_keepalive:
keepalive_probes: 1
keepalive_time: 10
keepalive_interval: 10
type: STATIC
hosts:- socket_address:
address: 127.0.0.1
port_value: 4436
- socket_address: