tilt icon indicating copy to clipboard operation
tilt copied to clipboard

Feature Request: Include/Exclude containers from logs

Open samwyma opened this issue 5 years ago • 10 comments

Hi!

Would it be possible to add an option to optionally include/exclude container logs from the UI? Specifically for us, we use Istio and the sidecar proxies can be fairly noisy. It would be nice to filter out logs from the sidecar container. Sort of related to #3744, but slightly different.

Thanks!

samwyma avatar Oct 01 '20 15:10 samwyma

Thanks for filing! This makes sense. I expect at some point we'll prioritize the various log filtering requests and we'll make sure this is considered with those.

landism avatar Oct 01 '20 18:10 landism

Ya, I've heard from other istio users that the istio thing is particularly annoying.

i could imagine a solution where we simply filter out the istio stuff by default, or have some istio-specific configuration options, rather than solving for the more general problem

nicks avatar Oct 02 '20 17:10 nicks

I realize it's a sensitive api to extend, but one blunt approach might be to add a logging parameter to k8s_resource?

k8s_resource(logging_config={'silenced_containers': ['istio-init']}) ?

tmc avatar Oct 02 '20 17:10 tmc

+1 from us on this issue. Istio debug prints are currently over 90% of all my streaming logs in Tilt making it difficult to read anything of value.

tclasen avatar Oct 26 '20 17:10 tclasen

i'm going to hack in something quick to ignore the istio-init and istio-sidecar logs, and we can keep this open for a more complete configuration / filtering solution (as in https://github.com/tilt-dev/tilt/issues/3033, https://github.com/tilt-dev/tilt/issues/3744)

nicks avatar Oct 27 '20 15:10 nicks

OK, tilt v0.17.10 should omit the istio logs (Edited to add: going to leave this open for the broader configurability, but hopefully that at least makes this less painful for now)

nicks avatar Oct 30 '20 21:10 nicks

Supporting similar flags to stern would be amazing, like their allow and deny lists and supporting RegEx: https://github.com/stern/stern#cli-flags

But I'm not too sure what the configuration options would look like, since prefixing or suffixing them with logs gets pretty clunky, e.g. allowed_containers_logs | ignored_containers_logs or something

zoidyzoidzoid avatar Feb 21 '21 20:02 zoidyzoidzoid

Curerntly on v0.20.4 and was looking for this functionality. I sort of expected one of the drop down selectors like in https://github.com/tilt-dev/tilt/pull/4114 to expose this.

After searching all over for it, I figured it must not be implemented and found this issue :)

alexeldeib avatar May 28 '21 04:05 alexeldeib

I published a blog post this week that talks about some of the log tooling we're building out: https://blog.tilt.dev/2021/05/24/real-programmers-log.html

You can currently include or exclude containers from the command-line with tilt apply and tilt edit on the podlogstream objects. We're still trying to figure out how to expose this in the Tiltfile and UI in a way that makes sense.

nicks avatar May 28 '21 23:05 nicks

I would like to get logs from one istio-proxy pod acting as a gateway. Any non-hacky way to achieve that?

Lanchez avatar Jun 26 '25 18:06 Lanchez