-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a key to the access default log text format #1800
Conversation
apart from adding a
Hoping to hear back on preferences cc @envoyproxy/gateway-maintainers |
also blocked on #1799 |
updated access log format to use spaces as the delimiter |
Codecov Report
@@ Coverage Diff @@
## main #1800 +/- ##
==========================================
- Coverage 65.25% 65.14% -0.12%
==========================================
Files 86 86
Lines 12480 12480
==========================================
- Hits 8144 8130 -14
- Misses 3821 3830 +9
- Partials 515 520 +5
|
with this format, can you use a json decoder directly in logstash/fluent? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this format a lot more than the default EnvoyProxy access logs
might as well go all the way to format it to be a JSON string so that external log aggregators can parse it as json structured logs |
@zirain @haq204 imo the JSON string format
is a little harder to read compared to
im fine proceeding either way, since adding a |
it's hard to use for other tools, same opinion with @haq204 . |
Before ``` [2023-08-18T22:15:14.085Z] "GET /get HTTP/1.1" 200 - 0 509 1 0 "10.1.3.156" "curl/7.86.0" "ec7ca022-80c8-4e7c-8271-167b260bd190" "www.example.com" "10.102.226.25:3000" ``` After ``` "start_time":"2023-08-18T22:01:23.901Z","method":"GET","x-envoy-origin-path":"/get","protocol":"HTTP/1.1","response_code":"200","response_flags":"-","response_code_details":"via_upstream","connection_termination_details":"-","upstream_transport_failure_reason":"-","bytes_received":"0","bytes_sent":"511","duration":"0","x-envoy-upstream-service-time":"0","x-forwarded-for":"192.168.65.4","user-agent":"curl/7.86.0","x-request-id":"000985ce-a62d-4899-95f8-c60fa9e5f246",":authority":"www.example.com","upstream_host":"10.104.223.83:3000","upstream_cluster":"default/backend/rule/0/match/0-www.example.com","upstream_local_address":"10.1.3.145:55664","downstream_local_address":"10.1.3.145:10080","downstream_remote_address":"192.168.65.4:50042","requested_server_name":"-","route_name":"default/backend/rule/0/match/0-www.example.com" ``` Fixes: envoyproxy#1446 Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
f453fa3
to
a811d98
Compare
3372392
to
a5be481
Compare
so the |
The default format is Text as JSON string 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @AliceProxy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much better than the default one. I always had to check the docs to find out the meaning of the Envoy logs before because lacking of the key before the value :-).
Before
After
Fixes: #1446