This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 671b587cf2940a2326847ad91a24804454e67893 Author: Masakazu Kitajo <[email protected]> AuthorDate: Mon Mar 24 16:23:33 2025 -0600 Add proxy.process.http.total_client_connections_uds (#12104) (cherry picked from commit 0c243736d8831462ffd520a6f06c28041fc970c0) --- doc/admin-guide/monitoring/statistics/core/http-connection.en.rst | 3 +++ include/proxy/http/HttpConfig.h | 1 + src/proxy/http/Http1ClientSession.cc | 5 ++++- src/proxy/http/HttpConfig.cc | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst b/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst index 80df47cf5b..edbd0c16c5 100644 --- a/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst +++ b/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst @@ -127,6 +127,9 @@ HTTP Connection .. ts:stat:: global proxy.process.http.total_client_connections_ipv6 integer :type: counter +.. ts:stat:: global proxy.process.http.total_client_connections_uds integer + :type: counter + .. ts:stat:: global proxy.process.http.total_incoming_connections integer :type: counter diff --git a/include/proxy/http/HttpConfig.h b/include/proxy/http/HttpConfig.h index a1d701d9cb..4a5347e649 100644 --- a/include/proxy/http/HttpConfig.h +++ b/include/proxy/http/HttpConfig.h @@ -258,6 +258,7 @@ struct HttpStatsBlock { Metrics::Counter::AtomicType *total_client_connections; Metrics::Counter::AtomicType *total_client_connections_ipv4; Metrics::Counter::AtomicType *total_client_connections_ipv6; + Metrics::Counter::AtomicType *total_client_connections_uds; Metrics::Counter::AtomicType *total_incoming_connections; Metrics::Counter::AtomicType *total_parent_marked_down_count; Metrics::Counter::AtomicType *total_parent_proxy_connections; diff --git a/src/proxy/http/Http1ClientSession.cc b/src/proxy/http/Http1ClientSession.cc index e1532f4dc3..14939c6e2a 100644 --- a/src/proxy/http/Http1ClientSession.cc +++ b/src/proxy/http/Http1ClientSession.cc @@ -183,8 +183,11 @@ Http1ClientSession::new_connection(NetVConnection *new_vc, MIOBuffer *iobuf, IOB case AF_INET6: Metrics::Counter::increment(http_rsb.total_client_connections_ipv6); break; + case AF_UNIX: + Metrics::Counter::increment(http_rsb.total_client_connections_uds); + break; default: - // don't do anything if the address family is not ipv4 or ipv6 + // don't do anything if the address family is not ipv4, ipv6, or unix domain socket // (there are many other address families in <sys/socket.h> // but we don't have a need to report on all the others today) break; diff --git a/src/proxy/http/HttpConfig.cc b/src/proxy/http/HttpConfig.cc index ef7247bb88..546fcfe3a5 100644 --- a/src/proxy/http/HttpConfig.cc +++ b/src/proxy/http/HttpConfig.cc @@ -486,6 +486,7 @@ register_stat_callbacks() http_rsb.total_client_connections = Metrics::Counter::createPtr("proxy.process.http.total_client_connections"); http_rsb.total_client_connections_ipv4 = Metrics::Counter::createPtr("proxy.process.http.total_client_connections_ipv4"); http_rsb.total_client_connections_ipv6 = Metrics::Counter::createPtr("proxy.process.http.total_client_connections_ipv6"); + http_rsb.total_client_connections_uds = Metrics::Counter::createPtr("proxy.process.http.total_client_connections_uds"); http_rsb.total_incoming_connections = Metrics::Counter::createPtr("proxy.process.http.total_incoming_connections"); http_rsb.total_parent_marked_down_count = Metrics::Counter::createPtr("proxy.process.http.total_parent_marked_down_count"); http_rsb.total_parent_proxy_connections = Metrics::Counter::createPtr("proxy.process.http.total_parent_proxy_connections");
