Aiven-Open / Aiven-Open/karapace

Add option to skip logging certain HTTP Routes

Offen
#1,197 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
634
Forks
110
Ø Merge
4 T. 7 Std.
Gemergte PRs (30 T.)
4

Beschreibung

# What is currently missing?

I would love a similar capability to [sasl_oauthbearer_skip_auth_paths](https://github.com/Aiven-Open/karapace/blob/50e006d35e3ff6edad949aa7ca3a81667eb86b7e/src/karapace/core/config.py#L117) but for logged http requests.

Specifically, I'm looking to reduce the noisiness of some of our logs where our kubelet is regularly hitting the `/_health` endpoint - which can be pretty frequent and largely contribute to noisiness of the service logs.

To stay backwards-compatible I'd definitely want this to stay an opt-in feature so that the default behavior is preserved. I'd hate for this functionality to cause anyone to miss anything important, but leaving it extensible should want to silence any other routes(at their own peril).

# How could this be improved?

Making this an opt-in feature to me seems like something that could help other users out without causing us to reduce visibility of the running application. I figure I could probably follow the same logic that's present for skipping auth requirements on a per-route basis to perform a nearly identical check on whether to log.

# Is this a feature you would work on yourself?

* [X] I plan to open a pull request for this feature(I certainly could if this seems like a useful feature to others!)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.