Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add proxy.process.http.total_client_connections_uds #12104

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions include/proxy/http/HttpConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion src/proxy/http/Http1ClientSession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/proxy/http/HttpConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down