sozu_lib/metrics/
names.rs1pub mod accept_queue {
22 pub const BACKPRESSURE: &str = "accept_queue.backpressure";
23 pub const CONNECTIONS: &str = "accept_queue.connections";
24 pub const SATURATED_SECONDS: &str = "accept_queue.saturated_seconds";
25 pub const TIMEOUT: &str = "accept_queue.timeout";
26 pub const WAIT_TIME: &str = "accept_queue.wait_time";
27}
28
29pub mod access_logs {
31 pub const COUNT: &str = "access_logs.count";
32 pub const UNSENT: &str = "unsent-access-logs";
33}
34
35pub mod backend {
39 pub const BYTES_IN: &str = "bytes_in";
40 pub const BYTES_OUT: &str = "bytes_out";
41 pub const BACK_BYTES_IN: &str = "back_bytes_in";
42 pub const BACK_BYTES_OUT: &str = "back_bytes_out";
43 pub const AVAILABLE: &str = "backend.available";
44 pub const CONNECTIONS: &str = "backend.connections";
45 pub const FLOW_CONTROL_PAUSED: &str = "backend.flow_control.paused";
46 pub const POOL_HIT: &str = "backend.pool.hit";
47 pub const POOL_MISS: &str = "backend.pool.miss";
48 pub const POOL_SIZE: &str = "backend.pool.size";
49 pub const CONNECTIONS_PER_BACKEND: &str = "connections_per_backend";
50 pub const CONNECTION_TIME: &str = "backend_connection_time";
51 pub const RESPONSE_TIME: &str = "backend_response_time";
52 pub const REQUESTS: &str = "requests";
53 pub const FAIL_OPEN: &str = "backends.fail_open";
54}
55
56pub mod buffer {
58 pub const CAPACITY: &str = "buffer.capacity";
59 pub const IN_USE: &str = "buffer.in_use";
60 pub const USAGE_PERCENT: &str = "buffer.usage_percent";
61}
62
63pub mod client {
65 pub const CONNECTIONS: &str = "client.connections";
66 pub const CONNECTIONS_MAX: &str = "client.connections_max";
67}
68
69pub mod cluster {
71 pub const AVAILABLE_BACKENDS: &str = "cluster.available_backends";
72 pub const AVAILABLE_RECOVERED: &str = "cluster.available_recovered";
73 pub const NO_AVAILABLE_BACKENDS: &str = "cluster.no_available_backends";
74 pub const TOTAL_BACKENDS: &str = "cluster.total_backends";
75}
76
77pub mod configuration {
80 pub const BACKENDS: &str = "configuration.backends";
81 pub const CLUSTERS: &str = "configuration.clusters";
82 pub const FRONTENDS: &str = "configuration.frontends";
83}
84
85pub mod event_loop {
87 pub const EPOLL_TIME: &str = "epoll_time";
88 pub const EVENT_LOOP_TIME: &str = "event_loop_time";
89 pub const FRONTEND_MATCHING_TIME: &str = "frontend_matching_time";
90 pub const REGEX_MATCHING_TIME: &str = "regex_matching_time";
91 pub const REQUEST_TIME: &str = "request_time";
92 pub const SERVICE_TIME: &str = "service_time";
93}
94
95pub mod health_check {
97 pub const UP: &str = "health_check.up";
98 pub const DOWN: &str = "health_check.down";
99 pub const SUCCESS: &str = "health_check.success";
100 pub const FAILURE: &str = "health_check.failure";
101}
102
103pub mod h1 {
105 pub const BACKEND_EOF_BEFORE_MESSAGE_COMPLETE: &str = "h1.backend_eof_before_message_complete";
106}
107
108pub mod h2 {
111 pub const CLOSE_WITH_ACTIVE_STREAMS: &str = "h2.close_with_active_streams";
112 pub const COALESCING_ACCEPTED: &str = "h2.coalescing.accepted";
113 pub const CONNECTION_ACTIVE_STREAMS: &str = "h2.connection.active_streams";
114 pub const CONNECTION_PENDING_WINDOW_UPDATES: &str = "h2.connection.pending_window_updates";
115 pub const CONNECTION_WINDOW_BYTES: &str = "h2.connection.window_bytes";
116 pub const FLOW_CONTROL_STALL: &str = "h2.flow_control_stall";
117
118 pub const STREAMS_REAPED_IDLE_TIMEOUT: &str = "h2.streams.reaped.idle_timeout";
123 pub const STREAMS_REAPED_WINDOW_STALL: &str = "h2.streams.reaped.window_stall";
124 pub const STREAMS_REAPED_STALL_BUDGET: &str = "h2.streams.reaped.stall_budget";
125
126 pub const FRAMES_TX_CONTINUATION: &str = "h2.frames.tx.continuation";
128 pub const FRAMES_TX_DATA: &str = "h2.frames.tx.data";
129 pub const FRAMES_TX_GOAWAY: &str = "h2.frames.tx.goaway";
130 pub const FRAMES_TX_HEADERS: &str = "h2.frames.tx.headers";
131 pub const FRAMES_TX_PING_ACK: &str = "h2.frames.tx.ping_ack";
132 pub const FRAMES_TX_RST_STREAM: &str = "h2.frames.tx.rst_stream";
133 pub const FRAMES_TX_SETTINGS: &str = "h2.frames.tx.settings";
134 pub const FRAMES_TX_WINDOW_UPDATE: &str = "h2.frames.tx.window_update";
135
136 pub const HEADERS_NO_STREAM_ERROR: &str = "h2.headers_no_stream.error";
138 pub const HEADERS_REJECTED_BUDGET_OVERRUN: &str = "h2.headers.rejected.budget_overrun";
139 pub const HEADERS_REJECTED_TOTAL: &str = "h2.headers.rejected.total";
140
141 pub const RST_STREAM_RECEIVED_PRE_RESPONSE_START: &str =
142 "h2.rst_stream.received.pre_response_start";
143
144 pub const SIGNAL_WRITABLE_REARMED_CONTROL_QUEUE: &str =
146 "h2.signal.writable.rearmed.control_queue";
147 pub const SIGNAL_WRITABLE_REARMED_DEFAULT_ANSWER: &str =
148 "h2.signal.writable.rearmed.default_answer";
149 pub const SIGNAL_WRITABLE_REARMED_FORCEFULLY_TERMINATE_ANSWER: &str =
150 "h2.signal.writable.rearmed.forcefully_terminate_answer";
151 pub const SIGNAL_WRITABLE_REARMED_PEER_DATA: &str = "h2.signal.writable.rearmed.peer_data";
152 pub const SIGNAL_WRITABLE_REARMED_PEER_HEADERS: &str =
153 "h2.signal.writable.rearmed.peer_headers";
154 pub const SIGNAL_WRITABLE_REARMED_PRIORITY_UPDATE: &str =
155 "h2.signal.writable.rearmed.priority_update";
156
157 pub const TRAILERS_DROPPED_CONTENT_LENGTH: &str = "h2.trailers_dropped_content_length";
158 pub const TRAILER_SPOOF_VECTOR_ELIDED: &str = "h2.trailer.spoof_vector_elided";
159 pub const WINDOW_UPDATE_DROPPED: &str = "h2.window_update_dropped";
160
161 pub const FLOOD_VIOLATION_CONTINUATION: &str = "h2.flood.violation.continuation";
165 pub const FLOOD_VIOLATION_GLITCH_WINDOW: &str = "h2.flood.violation.glitch_window";
166 pub const FLOOD_VIOLATION_MADE_YOU_RESET: &str = "h2.flood.violation.made_you_reset";
167 pub const FLOOD_VIOLATION_PING: &str = "h2.flood.violation.ping";
168 pub const FLOOD_VIOLATION_PRIORITY: &str = "h2.flood.violation.priority";
169 pub const FLOOD_VIOLATION_RAPID_RESET: &str = "h2.flood.violation.rapid_reset";
170 pub const FLOOD_VIOLATION_SETTINGS: &str = "h2.flood.violation.settings";
171}
172
173pub mod http {
176 pub const ERR_400: &str = "http.400.errors";
177 pub const ERR_404: &str = "http.404.errors";
178 pub const ACTIVE_REQUESTS: &str = "http.active_requests";
179 pub const ALPN_H2: &str = "http.alpn.h2";
180 pub const ALPN_HTTP11: &str = "http.alpn.http11";
181 pub const BACKEND_PARSE_ERRORS: &str = "http.backend_parse_errors";
182 pub const E2E_H2: &str = "http.e2e.h2";
183 pub const E2E_HTTP11: &str = "http.e2e.http11";
184 pub const EARLY_RESPONSE_CLOSE: &str = "http.early_response_close";
185 pub const FAILED_BACKEND_MATCHING: &str = "http.failed_backend_matching";
186 pub const FRONTEND_TE_SMUGGLING: &str = "http.frontend.transfer_encoding_smuggling";
189 pub const FRONTEND_PARSE_ERRORS: &str = "http.frontend_parse_errors";
190 pub const HSTS_FRONTEND_ADDED: &str = "http.hsts.frontend_added";
191 pub const HSTS_FRONTEND_REFRESHED: &str = "http.hsts.frontend_refreshed";
192 pub const HSTS_LISTENER_DEFAULT_PATCHED: &str = "http.hsts.listener_default_patched";
193 pub const HSTS_SUPPRESSED_PLAINTEXT: &str = "http.hsts.suppressed_plaintext";
194 pub const HSTS_UNRENDERED: &str = "http.hsts.unrendered";
195 pub const INFINITE_LOOP_ERROR: &str = "http.infinite_loop.error";
196 pub const REDIRECT_TEMPLATE_COMPILE_ERROR: &str = "http.redirect_template.compile_error";
197 pub const REQUESTS: &str = "http.requests";
198 pub const SNI_AUTHORITY_MISMATCH: &str = "http.sni_authority_mismatch";
199 pub const STATUS_1XX: &str = "http.status.1xx";
200 pub const STATUS_2XX: &str = "http.status.2xx";
201 pub const STATUS_3XX: &str = "http.status.3xx";
202 pub const STATUS_4XX: &str = "http.status.4xx";
203 pub const STATUS_5XX: &str = "http.status.5xx";
204 pub const STATUS_OTHER: &str = "http.status.other";
205 pub const TRUSTING_X_PORT: &str = "http.trusting.x_port";
206 pub const TRUSTING_X_PORT_DIFF: &str = "http.trusting.x_port.diff";
207 pub const TRUSTING_X_PROTO: &str = "http.trusting.x_proto";
208 pub const TRUSTING_X_PROTO_DIFF: &str = "http.trusting.x_proto.diff";
209 pub const UPGRADE_EXPECT_FAILED: &str = "http.upgrade.expect.failed";
210 pub const UPGRADE_MUX_FAILED: &str = "http.upgrade.mux.failed";
211 pub const UPGRADE_WS_FAILED: &str = "http.upgrade.ws.failed";
212 pub const X_REQUEST_ID_GENERATED: &str = "http.x_request_id.generated";
213 pub const X_REQUEST_ID_PROPAGATED: &str = "http.x_request_id.propagated";
214}
215
216pub mod http_status {
220 pub const S200: &str = "http.status.200";
221 pub const S201: &str = "http.status.201";
222 pub const S204: &str = "http.status.204";
223 pub const S301: &str = "http.status.301";
224 pub const S302: &str = "http.status.302";
225 pub const S304: &str = "http.status.304";
226 pub const S400: &str = "http.status.400";
227 pub const S401: &str = "http.status.401";
228 pub const S403: &str = "http.status.403";
229 pub const S404: &str = "http.status.404";
230 pub const S408: &str = "http.status.408";
231 pub const S413: &str = "http.status.413";
232 pub const S429: &str = "http.status.429";
233 pub const S500: &str = "http.status.500";
234 pub const S502: &str = "http.status.502";
235 pub const S503: &str = "http.status.503";
236 pub const S504: &str = "http.status.504";
237 pub const S507: &str = "http.status.507";
238}
239
240pub mod https {
242 pub const ALPN_REJECTED_HTTP11_DISABLED: &str = "https.alpn.rejected.http11_disabled";
243 pub const ALPN_REJECTED_UNSUPPORTED: &str = "https.alpn.rejected.unsupported";
244 pub const UPGRADE_EXPECT_FAILED: &str = "https.upgrade.expect.failed";
245 pub const UPGRADE_HANDSHAKE_FAILED: &str = "https.upgrade.handshake.failed";
246 pub const UPGRADE_MUX_FAILED: &str = "https.upgrade.mux.failed";
247 pub const UPGRADE_WSS_FAILED: &str = "https.upgrade.wss.failed";
248}
249
250pub mod listener {
252 pub const ACCEPTED_TOTAL: &str = "listener.accepted.total";
253 pub const CONNECTION_CAPPED: &str = "listener.connection_capped";
254}
255
256pub mod pipe {
258 pub const ERRORS: &str = "pipe.errors";
259}
260
261pub mod protocol {
264 pub const HTTP: &str = "protocol.http";
265 pub const HTTPS: &str = "protocol.https";
266 pub const PROXY_EXPECT: &str = "protocol.proxy.expect";
267 pub const PROXY_RELAY: &str = "protocol.proxy.relay";
268 pub const PROXY_SEND: &str = "protocol.proxy.send";
269 pub const TCP: &str = "protocol.tcp";
270 pub const TLS_HANDSHAKE: &str = "protocol.tls.handshake";
271 pub const WS: &str = "protocol.ws";
272 pub const WSS: &str = "protocol.wss";
273}
274
275pub mod proxy_protocol {
277 pub const ERRORS: &str = "proxy_protocol.errors";
278}
279
280pub mod rustls {
282 pub const READ_ERROR: &str = "rustls.read.error";
283 pub const READ_INFINITE_LOOP_ERROR: &str = "rustls.read.infinite_loop.error";
284 pub const WRITE_ERROR: &str = "rustls.write.error";
285 pub const WRITE_INFINITE_LOOP_ERROR: &str = "rustls.write.infinite_loop.error";
286}
287
288pub mod sessions {
290 pub const EVICTED: &str = "sessions.evicted";
291}
292
293pub mod slab {
295 pub const CAPACITY: &str = "slab.capacity";
296 pub const ENTRIES: &str = "slab.entries";
297 pub const USAGE_PERCENT: &str = "slab.usage_percent";
298}
299
300pub mod socket {
302 pub const READ_INFINITE_LOOP_ERROR: &str = "socket.read.infinite_loop.error";
303 pub const WRITE_INFINITE_LOOP_ERROR: &str = "socket.write.infinite_loop.error";
304}
305
306pub mod tcp {
308 pub const INFINITE_LOOP_ERROR: &str = "tcp.infinite_loop.error";
309 pub const READ_ERROR: &str = "tcp.read.error";
310 pub const REQUESTS: &str = "tcp.requests";
311 pub const UPGRADE_EXPECT_FAILED: &str = "tcp.upgrade.expect.failed";
312 pub const UPGRADE_PIPE_FAILED: &str = "tcp.upgrade.pipe.failed";
313 pub const UPGRADE_RELAY_FAILED: &str = "tcp.upgrade.relay.failed";
314 pub const UPGRADE_SEND_FAILED: &str = "tcp.upgrade.send.failed";
315 pub const UPGRADE_SNI_PREREAD_FAILED: &str = "tcp.upgrade.sni_preread.failed";
316 pub const WRITE_ERROR: &str = "tcp.write.error";
317
318 pub mod sni_preread {
325 use crate::protocol::tcp_preread::RejectReason;
326
327 pub const ROUTED: &str = "tcp.sni_preread.routed";
329 pub const ACTIVE: &str = "tcp.sni_preread.active";
333 pub const DURATION: &str = "tcp.sni_preread.duration";
336
337 pub const REJECTED_NOT_TLS: &str = "tcp.sni_preread.rejected.not_tls";
338 pub const REJECTED_MALFORMED_RECORD: &str = "tcp.sni_preread.rejected.malformed_record";
339 pub const REJECTED_MALFORMED_HANDSHAKE: &str =
340 "tcp.sni_preread.rejected.malformed_handshake";
341 pub const REJECTED_FRAGMENTED: &str = "tcp.sni_preread.rejected.fragmented";
342 pub const REJECTED_TOO_LARGE: &str = "tcp.sni_preread.rejected.too_large";
343 pub const REJECTED_NO_SNI: &str = "tcp.sni_preread.rejected.no_sni";
344 pub const REJECTED_ECH_OUTER_ABSENT: &str = "tcp.sni_preread.rejected.ech_outer_absent";
345 pub const REJECTED_SNI_UNMATCHED: &str = "tcp.sni_preread.rejected.sni_unmatched";
346 pub const REJECTED_ALPN_UNMATCHED: &str = "tcp.sni_preread.rejected.alpn_unmatched";
347 pub const REJECTED_PROXY_HEADER_INVALID: &str =
348 "tcp.sni_preread.rejected.proxy_header_invalid";
349 pub const REJECTED_FRONT_CLOSED: &str = "tcp.sni_preread.rejected.front_closed";
350
351 pub fn rejected_name(reason: RejectReason) -> &'static str {
355 match reason {
356 RejectReason::NotTls => REJECTED_NOT_TLS,
357 RejectReason::MalformedRecord => REJECTED_MALFORMED_RECORD,
358 RejectReason::MalformedHandshake => REJECTED_MALFORMED_HANDSHAKE,
359 RejectReason::Fragmented => REJECTED_FRAGMENTED,
360 RejectReason::TooLarge => REJECTED_TOO_LARGE,
361 RejectReason::NoSni => REJECTED_NO_SNI,
362 RejectReason::EchOuterAbsent => REJECTED_ECH_OUTER_ABSENT,
363 RejectReason::SniUnmatched => REJECTED_SNI_UNMATCHED,
364 RejectReason::AlpnUnmatched => REJECTED_ALPN_UNMATCHED,
365 RejectReason::ProxyHeaderInvalid => REJECTED_PROXY_HEADER_INVALID,
366 RejectReason::FrontClosed => REJECTED_FRONT_CLOSED,
367 }
368 }
369 }
370}
371
372pub mod udp {
379 pub const DATAGRAMS_IN: &str = "udp.datagrams.in";
381 pub const DATAGRAMS_OUT: &str = "udp.datagrams.out";
383 pub const BYTES_IN: &str = "udp.bytes.in";
385 pub const BYTES_OUT: &str = "udp.bytes.out";
387 pub const ACTIVE_FLOWS: &str = "udp.active_flows";
389 pub const FLOWS_CREATED: &str = "udp.flows.created";
391 pub const FLOWS_EVICTED: &str = "udp.flows.evicted";
393 pub const FLOWS_SHED: &str = "udp.flows.shed";
395 pub const DATAGRAMS_DROPPED: &str = "udp.datagrams.dropped";
401 pub const DROPPED_INVALID: &str = "udp.datagrams.dropped.invalid";
403 pub const DROPPED_TRUNCATED: &str = "udp.datagrams.dropped.truncated";
405 pub const DROPPED_NO_BACKEND: &str = "udp.datagrams.dropped.no_backend";
407 pub const DROPPED_SHED: &str = "udp.datagrams.dropped.shed";
409 pub const DROPPED_UNKNOWN_FLOW: &str = "udp.datagrams.dropped.unknown_flow";
411 pub const DROPPED_WQ_FULL: &str = "udp.datagrams.dropped.wq_full";
414 pub const DROPPED_SEND_ERROR: &str = "udp.datagrams.dropped.send_error";
419 pub const BACKEND_HEALTH: &str = "udp.backend.health";
421 pub const FLOW_DURATION: &str = "udp.flow.duration";
423}
424
425pub mod tls {
427 pub const CERT_MIN_EXPIRES_AT_SECONDS: &str = "tls.cert.min_expires_at_seconds";
428 pub const DEFAULT_CERT_USED: &str = "tls.default_cert_used";
429 pub const HANDSHAKE_MS: &str = "tls.handshake_ms";
430}
431
432pub mod websocket {
434 pub const ACTIVE_REQUESTS: &str = "websocket.active_requests";
435}
436
437pub mod misc {
439 pub const PANIC: &str = "panic";
440 pub const ZOMBIES: &str = "zombies";
441}