http: add stream reset countres to the stats 32/43732/3
authorMatus Fabian <[email protected]>
Mon, 22 Sep 2025 15:18:25 +0000 (11:18 -0400)
committerFlorin Coras <[email protected]>
Thu, 25 Sep 2025 15:34:08 +0000 (15:34 +0000)
Type: improvement

Change-Id: Id255a0e03f127576abcdc7a0e025c9f3c3eb6981
Signed-off-by: Matus Fabian <[email protected]>
src/plugins/http/http2/http2.c
src/plugins/http/http_private.h

index dc3dd3e..f09bc2d 100644 (file)
@@ -2517,6 +2517,7 @@ http2_handle_rst_stream_frame (http_conn_t *hc, http2_frame_header_t *fh)
     }
 
   req->stream_state = HTTP2_STREAM_STATE_CLOSED;
+  http_stats_stream_reset_by_peer_inc (hc->c_thread_index);
 
   if (!(req->flags & HTTP2_REQ_F_APP_CLOSED))
     session_transport_reset_notify (&req->base.connection);
@@ -2950,6 +2951,7 @@ http2_app_reset_callback (http_conn_t *hc, u32 req_index,
            req_index);
   req = http2_req_get (req_index, thread_index);
   req->flags |= HTTP2_REQ_F_APP_CLOSED;
+  http_stats_stream_reset_by_app_inc (thread_index);
   http2_send_stream_error (hc, req->stream_id,
                           req->base.is_tunnel ? HTTP2_ERROR_CONNECT_ERROR :
                                                 HTTP2_ERROR_INTERNAL_ERROR,
index 0fdb632..f5d600c 100644 (file)
@@ -26,6 +26,8 @@ static const http_token_t http2_conn_preface = { http_token_lit (
   _ (connections_reset_by_app, "connections reset by app")                    \
   _ (app_streams_opened, "application streams opened")                        \
   _ (app_streams_closed, "application streams closed")                        \
+  _ (stream_reset_by_peer, "streams reset by peer")                           \
+  _ (stream_reset_by_app, "streams reset by app")                             \
   _ (requests_received, "requests received")                                  \
   _ (requests_sent, "requests sent")                                          \
   _ (responses_received, "responses received")                                \