emissary-ingress / emissary

open source Kubernetes-native API gateway for microservices built on the Envoy Proxy
https://www.getambassador.io
Apache License 2.0
4.34k stars 681 forks source link

GCP stackdriver logs for diag service are captured at the wrong level #5192

Open alexionescu opened 1 year ago

alexionescu commented 1 year ago

Describe the bug The ambassador diag service will output everything as error severity to GCP logs due to outputting to stderr and the structured JSON field having levelname as the key used for logging severity. Per https://cloud.google.com/logging/docs/structured-logging#special-payload-fields the suggest field would be severity (I believe level can also be used). I have a PR here: https://github.com/emissary-ingress/emissary/pull/4941 which renames the field from levelname to severity which would annotate logs from this service at the right level.

cindymullins-dw commented 1 year ago

To check if I understand, are you saying that - of the severity levels noted below - only ERROR will be output currently? And that's because the wrong key is being used? Have you tested this - could you demonstrate some sample output that shows this?

DEFAULT | (0) The log entry has no assigned severity level. DEBUG | (100) Debug or trace information. INFO | (200) Routine information, such as ongoing status or performance. NOTICE | (300) Normal but significant events, such as start up, shut down, or a configuration change. WARNING | (400) Warning events might cause problems. ERROR | (500) Error events are likely to cause problems. CRITICAL | (600) Critical events cause more severe problems or outages. ALERT | (700) A person must take an action immediately. EMERGENCY | (800) One or more systems are unusable.

LanceEa commented 1 year ago

@alexionescu - Thanks for creating the issue and for the PR.

A few things from my perspective: