Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Jan 20, 2026

The proxy.process.http.incoming_requests metric was only incremented in HttpTransact::HandleRequest(), which is called late in the request processing pipeline. Requests that received error or redirect responses before reaching HandleRequest were never counted, causing significant underreporting during high-error-rate scenarios.

This fix moves the increment to HttpSM::attach_client_session(), which is called at the start of every transaction. This ensures all requests are counted, including those that fail header parsing, receive remap redirects, or hit early error conditions. This aligns with the documented behavior that incoming_requests should include errors and redirects (see doc/appendices/command-line/traffic_top.en.rst):

"Total number of client requests serviced by Traffic Server. This
includes both successful content-bearing responses as well as
errors, redirects, and not-modified IMS responses."

The proxy.process.http.incoming_requests metric was only incremented in
HttpTransact::HandleRequest(), which is called late in the request
processing pipeline. Requests that received error or redirect responses
before reaching HandleRequest were never counted, causing significant
underreporting during high-error-rate scenarios.

This fix moves the increment to HttpSM::attach_client_session(), which
is called at the start of every transaction. This ensures all requests
are counted, including those that fail header parsing, receive remap
redirects, or hit early error conditions. This aligns with the
documented behavior that incoming_requests should include errors and
redirects (see doc/appendices/command-line/traffic_top.en.rst):

    "Total number of client requests serviced by Traffic Server. This
    includes both successful content-bearing responses as well as
    errors, redirects, and not-modified IMS responses."
@bneradt bneradt added this to the 10.2.0 milestone Jan 20, 2026
@bneradt bneradt self-assigned this Jan 20, 2026
@maskit
Copy link
Member

maskit commented Jan 20, 2026

The new location looks better, but I'm wondering if this is the earliest possible point to increment the metric. I think H2 requests that have decoding errors (e.g. unrecognized pseudo headers, compression errors, etc) are still not counted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants