Skip to content

containers: apply EXCLUDE_HTTP_REQUESTS_BY_PATH to inbound HTTP/1 requests - #385

Merged
def merged 1 commit into
coroot:mainfrom
cooljacob204:inbound-http-path-filter
Oct 21, 2026
Merged

def merged 1 commit into
coroot:mainfrom
cooljacob204:inbound-http-path-filter

Conversation

@cooljacob204

Copy link
Copy Markdown
Contributor

Disclaimer: I haven't work with go much and have a pretty rudimentary understanding of what's going on in this project. Change is fairly small though and I think straight forward.

The issue in my case is: EXCLUDE_HTTP_REQUESTS_BY_PATH isn't applied to inbound HTTP/1 requests. Outbound HTTP/1, outbound HTTP/2 and inbound HTTP/2 all check HttpFilter, but the HTTP/1 case in observeInboundL7 doesn't, so excluded paths still end up in container_http_inbound_requests_total and the inbound latency histogram.

I ran into this with Matrix, where clients long poll /_matrix/client/v3/sync for 30s. Even with /_matrix/client/*/sync* excluded, those requests kept tripping the latency SLO on my reverse proxy.

This adds the same check the outbound did in a similar style:

case l7.ProtocolHTTP:
method, path := l7.ParseHttp(r.Payload)
if !common.HttpFilter.ShouldBeSkipped(path) {
stats.observe(r.Status.Http(), "", r.Duration)
trace.HttpRequest(method, path, r.Status, r.Duration)
}

I ran the patched agent on my cluster and the /sync requests no longer count toward inbound latency, while other requests are still counted.

The contributor file says to add tests for changes, but I didn't see any existing tests around these features. Point me in a direction and I'll be happy to add them if needed.

@def
def force-pushed the inbound-http-path-filter branch from 525c14f to 7788fbd Compare October 21, 2026 18:35
@def

def commented Oct 21, 2026

Copy link
Copy Markdown
Member

@cooljacob204 thank you!

@def
def merged commit 89a858a into coroot:main Oct 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants