aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/rephist.h
AgeCommit message (Collapse)Author
2024-01-30metrics: Add new relay metrics to MetricsPortDavid Goulet
This commit adds the total number of DROP cell seen, the total number of DESTROY cell received and the total number of protocol violation that lead to a circuit close. Closes #40816 Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-09-19Handle ntor and ntor_v3 individually in rephist and for MetricsPort.Alexander Færøy
This patch should not mess with the DoS protection here. Fixes tpo/core/tor#40638.
2023-05-25Removed getter abstraction and moved from rephist to relay_metrics.friendly73
2023-05-25Fixed REND1 metric label valuefriendly73
2023-05-25Added INTRO and REND metrics for relay.friendly73
2022-11-03metrics: Add connection socket family to metricsDavid Goulet
Adds either ipv4 or ipv6 to the "tor_relay_connections_total" stats. Closes #40710 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27metrics: Fix naming and documentationDavid Goulet
After nickm's review, minor changes to names and comments. Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26rephist: Track number of streams seen per typeDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-12relay: Add number of rejected connections to MetricsPortDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-12conn: Keep stats of opened and closed connectionsDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-15rephist: Introduce a fraction and period for overload onionskinDavid Goulet
This code was heavily reused from the previous DNS timeout work done in ticket #40491 that was removed afterall from our code. Closes #40560 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22Handle other places that use onion handshake type valuesMike Perry
We want ntor and ntorv3 to use the same queues and stats.
2021-12-13relay: Change DNS timeout label on MetricsPortDavid Goulet
Change it from "timeout" to "tor_timeout" in order to indicate that the DNS timeout is one from tor's DNS threshold and not the DNS server itself. Fixes #40527 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-20relay: Overload state on DNS timeout is now X% over Y secsDavid Goulet
With this commit, we will only report a general overload state if we've seen more than X% of DNS timeout errors over Y seconds. Previous behavior was to report when a single timeout occured which is really too small of a threshold. The value X is a consensus parameters called "overload_dns_timeout_scale_percent" which is a scaled percentage (factor of 1000) so we can represent decimal points for X like 0.5% for instance. Its default is 1000 which ends up being 1%. The value Y is a consensus parameters called "overload_dns_timeout_period_secs" which is the time period for which will gather DNS errors and once over, we assess if that X% has been reached ultimately triggering a general overload signal. Closes #40491 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12rephist: Add a counter for the onioniskins statsDavid Goulet
Current counters are reset every heartbeat. This commit adds two counters for the assigned and dropped onionskins that are not reset so they can be exported onto the MetricsPort. Closes #40387 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Add TCP port exhaustion metricsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12dns: Gather DNS request statisticsDavid Goulet
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>
2021-05-12relay: Add the global connection limit metricsDavid Goulet
This emits two events (read and write) of the total number that the global connection limit was reached. Related to #40367 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Add the onionskins processing metricsDavid Goulet
With this commit, a relay now emits metrics event on the MetricsPort related to how many onionskins were handled (processed or dropped) for each handshake type. Related to #40367 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-04-13relay: Move "overload-general" from extra-info to server descriptor.Alexander Færøy
Fixes #40364 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-03-17Merge branch 'mr/334'George Kadianakis
2021-03-17Implement backbone of overload statistics.George Kadianakis
- Implement overload statistics structure. - Implement function that keeps track of overload statistics. - Implement function that writes overload statistics to descriptor. - Unittest for the whole logic.
2021-03-12Run "make autostyle" in advance of new series.Nick Mathewson
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-02-19hs: Remove v2 statsDavid Goulet
We still keep v2 rendezvous stats since we will allow them until the network has entirely phased out. Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-03Switch v3_onions_seen_this_period to digest256map_t.George Kadianakis
2020-11-03Abstract v2/v3 "format stats to str" logic into a single function.George Kadianakis
2020-11-03Abstract v2/v3 "write stats to file" logic into a single function.George Kadianakis
2020-11-03Write unittests for v3 metrics.George Kadianakis
2020-11-03Implement support for "v3 rend traffic" stat.George Kadianakis
2020-11-03Implement support for "unique v3 onions" stat.George Kadianakis
2020-11-03Introduce v3_stats_t structure and some of its methods.George Kadianakis
2020-11-02Make room for v3: Complete move from hs_stats_t to hs_v2_stats_t.George Kadianakis
2020-11-02Make room for v3: s/hs_stats/hs_v2_stats/George Kadianakis
2020-07-10Split bidi connection-stats code into a new C file.Nick Mathewson
2020-07-10Split bandwidth history functions into a separate C file.Nick Mathewson
These are logically independent from the rest of rephist, and make more sense in isolation. The next patch will rename them too.
2020-07-01control: Add a key to GETINFO to fetch the circuit onion handshake rephist ↵Neel Chauhan
values
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-06-05Run "make autostyle."Nick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-09-27Move the predicted ports code out of rephist.cNick Mathewson
It differs from the rest of the rephist code in that it's actually necessary for Tor to operate, so it should probably go somewhere else. I'm not sure where yet, so I'll leave it in the same directory, but give it its own file.
2018-09-20Merge branch 'bug23512-v4-029-fixes'Nick Mathewson
2018-09-18Merge branch 'bug23512-v4-033' into bug23512-v4-masterMike Perry
2018-09-04Merge branch 'bug24104_029_squashed'Nick Mathewson
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.