3

I'm running my app in Google Kubernetes Engine, and the Stackdriver Traces are very useful to determine the health and speed of my app.

However the large majority of request coming into my app are the health checks from the load-balancer to make sure the pod is ready to receive traffic. This makes the overview tab of the traces console in Google Cloud completely useless since it's essentially just telling me about the health checks.

Is there a way to exclude the health checks from what is being traced?

Toby 1 Kenobi
  • 287
  • 2
  • 13
  • Have you had a look at the [Trace filters](https://cloud.google.com/trace/docs/finding-traces#filter_traces)? – mebius99 Feb 11 '20 at 14:35
  • @mebius99 yes, but the syntax is very limiting there doesn't seem to be a way to exclude matches, only for including matches. Also I don't think this will help with the data shown in the overview tab. – Toby 1 Kenobi Feb 12 '20 at 04:35
  • There is a feature request here. Please vote. https://issuetracker.google.com/issues/130804990 – tsu1980 Jul 17 '22 at 02:05

1 Answers1

1

Since you can't exclude and filter out the accumulated health checks, it seems the only workaround is to avoid generating excessive health check traces. That way they will be filtered on the input instead of the output. Though this might work only if your App is written by your developer team.

The trace calls in the App should be put into a wrapper that recognizes healthcheck requests by analysing the source subnet (may not work with proxy) or the HTTP request, and traces say only every 100th of such requests.

NOTE. There is a Feature Request #150672457 on Buganizer that could address the issue you're facing.

mebius99
  • 404
  • 2
  • 6
  • My app is written by my development team, but it doesn't generate trace calls. That's done by the ESP (Endpoint Services Proxy) that Google provides and runs alongside my app. – Toby 1 Kenobi Mar 01 '20 at 06:42
  • Since this is a managed service, the trace it generates is out of your control, indeed. By the way, there is a request [#150672457](https://issuetracker.google.com/150672457) on Google Buganizer; the link has been added to the answer. – mebius99 Mar 03 '20 at 13:56