]> git.ipfire.org Git - thirdparty/tor.git/commit
metrics: Add a `reason` label to the HS error metrics.
authorGabriela Moldovan <gabi@torproject.org>
Wed, 15 Feb 2023 14:52:35 +0000 (14:52 +0000)
committerDavid Goulet <dgoulet@torproject.org>
Tue, 7 Mar 2023 14:46:05 +0000 (09:46 -0500)
commit16c6788fbc30cf0a2611dd021d1797931a53a86d
tree10486dd6918e9c97c85fc1539abe6bfec0f5a3ff
parent119b84c365da867a6dcb85877f1d13dcf06c59a4
metrics: Add a `reason` label to the HS error metrics.

This adds a `reason` label to the `hs_intro_rejected_intro_req_count` and
`hs_rdv_error_count` metrics introduced in #40755.

Metric look up and intialization is now more a bit more involved. This may be
fine for now, but it will become unwieldy if/when we add more labels (and as
such will need to be refactored).

Also, in the future, we may want to introduce finer grained `reason` labels.
For example, the `invalid_introduce2` label actually covers multiple types of
errors that can happen during the processing of an INTRODUCE2 cell (such as
cell parse errors, replays, decryption errors).

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
12 files changed:
changes/ticket40758 [new file with mode: 0644]
src/core/or/circuituse.c
src/feature/hs/hs_circuit.c
src/feature/hs/hs_metrics.c
src/feature/hs/hs_metrics.h
src/feature/hs/hs_metrics_entry.c
src/feature/hs/hs_metrics_entry.h
src/feature/hs/hs_service.c
src/lib/metrics/metrics_store_entry.c
src/lib/metrics/metrics_store_entry.h
src/test/test_hs_metrics.c
src/test/test_hs_service.c