gateway icon indicating copy to clipboard operation
gateway copied to clipboard

feat: support access log formatters

Open aoledk opened this issue 9 months ago • 1 comments

What this PR does / why we need it:

Enable user to configure access log formatter ^1.

Which issue(s) this PR fixes:

Fixes #3279

aoledk avatar Apr 29 '24 09:04 aoledk

this reminder should take a look if open telemetry access logger support this formatter.

zirain avatar Apr 30 '24 12:04 zirain

this reminder should take a look if open telemetry access logger support this formatter.

I've checked Envoy docs about access log, it's not an option to set formatter for open telemetry access log ^1.

aoledk avatar May 03 '24 14:05 aoledk

this reminder should take a look if open telemetry access logger support this formatter.

I've checked Envoy docs about access log, it's not an option to set formatter for open telemetry access log 1.

Footnotes

  1. https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/access_loggers/open_telemetry/v3/logs_service.proto#extension-envoy-access-loggers-open-telemetry

but CEL METADATA should work on it.

zirain avatar May 03 '24 15:05 zirain

but CEL METADATA should work on it.

I need to validate whether CEL or METADATA works with open telemetry access log under specific envoy configs.

I'll updated when it's done.

aoledk avatar May 03 '24 16:05 aoledk

but CEL METADATA should work on it.

I need to validate whether CEL or METADATA works with open telemetry access log under specific envoy configs.

I'll updated when it's done.

it's not blocker for this PR.

zirain avatar May 04 '24 01:05 zirain

When CEL or METADATA or REQ_WITHOUT_QUERY is configured in open telemetry access log, Envoy will panic ^1 with error Not supported field in StreamInfo: CEL or Not supported field in StreamInfo: METADATA or Not supported field in StreamInfo: REQ_WITHOUT_QUERY.

aoledk avatar May 04 '24 02:05 aoledk

When CEL or METADATA or REQ_WITHOUT_QUERY is configured in open telemetry access log, Envoy will panic 1 with error Not supported field in StreamInfo: CEL or Not supported field in StreamInfo: METADATA or Not supported field in StreamInfo: REQ_WITHOUT_QUERY.

Footnotes

  1. https://github.com/envoyproxy/envoy/blob/2092d65bd4d476be8235ea541e5d25c096b513e6/source/common/formatter/stream_info_formatter.h#L277

Thinks for trying this, envoy should support this.

zirain avatar May 04 '24 07:05 zirain

/retest

shawnh2 avatar May 07 '24 07:05 shawnh2

/retest

shawnh2 avatar May 07 '24 08:05 shawnh2

/retest

aoledk avatar May 08 '24 09:05 aoledk

/retest

aoledk avatar May 08 '24 10:05 aoledk

this flaky seems just be fixed.

zirain avatar May 08 '24 11:05 zirain

would be great to add an example in our docs as a follow up

arkodg avatar May 08 '24 19:05 arkodg