improve trace counter in middleware

1 job for !469 with reduce_probe_trace_sampling in 14 minutes and 54 seconds (queued for 1 second)
latest merge request