gloo icon indicating copy to clipboard operation
gloo copied to clipboard

Feat: Expose envoy's`config.filter.accesslog.v2.AccessLogFilter`

Open NelsonJeppesen opened this issue 5 years ago • 4 comments

Use-case

I want to enable Access Logs for tracking but the number of logs is overwhelming. I'd like to use config.filter.accesslog.v2.RuntimeFilter to log just a percentage of the logs https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/filter/accesslog/v2/accesslog.proto#envoy-api-msg-config-filter-accesslog-v2-runtimefilter

Feature request

Expose envoy's config.filter.accesslog.v2.RuntimeFilter in Gloo's Gateway CRD

Something like this:

apiVersion: gateway.solo.io/v1
kind: Gateway
metadata:
  annotations:
    origin: default
  name: gateway
  namespace: gloo-system
spec:
  bindAddress: '::'
  bindPort: 8080
  proxyNames: 
    - gateway-proxy
  httpGateway: {}
  useProxyProto: false
  options:
    accessLoggingService:
      accessLog:
      - fileSink:
          path: /dev/stdout
+         filter:
+           runtime_filter:
+             runtime_key: somekey
+             percent_sampled: 
+                 numerator: "..."
+               denominator: "..."
+           use_independent_randomness": true
          stringFormat: ""

NelsonJeppesen avatar Jan 31 '20 20:01 NelsonJeppesen

I am also interested in the ability to use envoy's access log filter. I was using it before we moved to gloo from a custom control plane to log requests that resulted in 4xx or 5xx responses.

delta50 avatar Sep 29 '20 18:09 delta50

this would be super helpful

alex-mozejko avatar Aug 20 '21 04:08 alex-mozejko

@yuval-k Is there any chance to get this feature implemented? Within high load systems it's nearly impossible to log each and every access due to massive performance degradation of Gloo as well as massive performance impact on log forwarders and log indexers, but sampled logs could be really helpful. I also don't know if there is a chance to enable/disable access logs dynamically as it's possible with envoy's router logs etc.

jrauschenbusch avatar May 24 '22 08:05 jrauschenbusch

got a new ask about this feature, from a prospect

bcollard avatar Sep 08 '22 09:09 bcollard

reopening for backport to 1.13

kevin-shelaga avatar May 25 '23 14:05 kevin-shelaga

backported to v1.13.19 and v1.14.5

nfuden avatar Jun 12 '23 13:06 nfuden