diff options
author | David Goulet <dgoulet@torproject.org> | 2021-05-06 09:46:02 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-05-12 11:58:25 -0400 |
commit | 423910e01bce71d58ad909fd92a45ac4eccb54e5 (patch) | |
tree | f4c6ab8aa8dbd363d2c5c0f6209491029c1ac339 /src/feature/stats/rephist.h | |
parent | 897344fddc1ea5ba6dc0db814a703932b05560f4 (diff) | |
download | tor-423910e01bce71d58ad909fd92a45ac4eccb54e5.tar.gz tor-423910e01bce71d58ad909fd92a45ac4eccb54e5.zip |
dns: Gather DNS request statistics
We now keep track of all errors and total number of request seen. This
is so we can expose those values to the MetricsPort to help Exit
operators monitor the DNS requests and failures.
Related to #40367.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/stats/rephist.h')
-rw-r--r-- | src/feature/stats/rephist.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/feature/stats/rephist.h b/src/feature/stats/rephist.h index b54fc77883..9d2e457b4b 100644 --- a/src/feature/stats/rephist.h +++ b/src/feature/stats/rephist.h @@ -80,6 +80,11 @@ void rep_hist_note_negotiated_link_proto(unsigned link_proto, int started_here); void rep_hist_log_link_protocol_counts(void); +uint64_t rep_hist_get_n_dns_error(int type, uint8_t error); +uint64_t rep_hist_get_n_dns_request(int type); +void rep_hist_note_dns_request(int type); +void rep_hist_note_dns_error(int type, uint8_t error); + extern uint64_t rephist_total_alloc; extern uint32_t rephist_total_num; #ifdef TOR_UNIT_TESTS |