mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-05 18:03:36 +02:00
MINOR: h3: Add a statistics module for h3
Add ->inc_err_cnt new callback to qcc_app_ops struct which can be called from xprt to increment the application level error code counters. It take the application context as first parameter to be generic and support new QUIC applications to come. Add h3_stats.c module with counters for all the frame types and error codes.
This commit is contained in:
committed by
Amaury Denoyelle
parent
38dea05ca9
commit
6f7607ef1f
12
include/haproxy/h3_stats-t.h
Normal file
12
include/haproxy/h3_stats-t.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef _HAPROXY_H3_STATS_T_H
|
||||
#define _HAPROXY_H3_STATS_T_H
|
||||
|
||||
#ifdef USE_QUIC
|
||||
#ifndef USE_OPENSSL
|
||||
#error "Must define USE_OPENSSL"
|
||||
#endif
|
||||
|
||||
extern struct stats_module h3_stats_module;
|
||||
|
||||
#endif /* USE_QUIC */
|
||||
#endif /* _HAPROXY_H3_STATS_T_H */
|
||||
17
include/haproxy/h3_stats.h
Normal file
17
include/haproxy/h3_stats.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _HAPROXY_H3_STATS_H
|
||||
#define _HAPROXY_H3_STATS_H
|
||||
|
||||
#ifdef USE_QUIC
|
||||
#ifndef USE_OPENSSL
|
||||
#error "Must define USE_OPENSSL"
|
||||
#endif
|
||||
|
||||
#include <haproxy/h3_stats-t.h>
|
||||
|
||||
struct h3_counters;
|
||||
|
||||
void h3_inc_err_cnt(void *ctx, int error_code);
|
||||
void h3_inc_frame_type_cnt(struct h3_counters *ctrs, int frm_type);
|
||||
|
||||
#endif /* USE_QUIC */
|
||||
#endif /* _HAPROXY_H3_STATS_H */
|
||||
@@ -143,6 +143,7 @@ struct qcc_app_ops {
|
||||
int (*finalize)(void *ctx);
|
||||
int (*is_active)(const struct qcc *qcc, void *ctx);
|
||||
void (*release)(void *ctx);
|
||||
void (*inc_err_cnt)(void *ctx, int err_code);
|
||||
};
|
||||
|
||||
#endif /* USE_QUIC */
|
||||
|
||||
Reference in New Issue
Block a user