aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay/relay_metrics.c
AgeCommit message (Collapse)Author
2023-10-18add metrics for rejected BEGIN/RESOLVEtrinity-1686a
2023-05-25Added relay prefix to new metrics functionsfriendly73
2023-05-25Fixed new arguments for metrics_store_addfriendly73
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
2023-05-24metrics: Add ticket 40546 changes file and code fixDavid Goulet
The MR was using an old function definition so the code fix is for that. Closes #40546 Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-05-24Merge branch 'tor-gitlab/mr/698'David Goulet
2023-03-19don't emit key expiration metric instead of setting it to zerotrinity-1686a
2023-03-13metrics: Add support for histograms.Gabriela Moldovan
This will enable us to add e.g. circuit build metrics (#40717). Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-03-06add new metrics entry for cert expirationtrinity-1686a
2022-12-07metrics: Fix typo in a labelDavid Goulet
Fixes #40727 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-12-02Ticket 40724: Add metrics for CC circuit countsMike Perry
2022-12-01Ticket 40724: Additional congestion control metricsMike Perry
2022-11-10metrics: Split cc with counters and gaugesDavid Goulet
Part of #40712 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-10metrics: Split connections with a counter and gaugeDavid Goulet
Created and Rejected connections are ever going up counters. While Opened connections are gauges going up and down. Fixes #40712 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-09Merge branch 'tor-gitlab/mr/654' into maint-0.4.7David Goulet
2022-11-09metrics: Reorganize state labels so rate() can be appliedMike Perry
Part of #40708.
2022-11-08Merge branch 'tor-gitlab/mr/651' into maint-0.4.7David Goulet
2022-11-08metrics: Record percentage of blocked channelsMike Perry
Part of #40708.
2022-11-08metrics: Report amount of cwnd drop from delta and gammaMike Perry
Part of #40708.
2022-11-07metrics: Add flow control metrics.Mike Perry
Part of #40708.
2022-11-07metrics: Add stats when the clock stalls.Mike Perry
Part of #40708.
2022-11-07metrics: Add running average of CC cwnd in slow start when closing circuitMike Perry
Count slow start separately. Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07metrics: Add stats when reaching vegas delta or ss_cwnd_maxDavid Goulet
Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07metrics: Add running average of CC cwnd when closing circuitDavid Goulet
Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07metrics: Add running average of CC cwnd when exiting slow startDavid Goulet
Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-11-03metrics: Add stats for num circ reaching max cell outqDavid Goulet
Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27Merge branch 'tor-gitlab/mr/644' into maint-0.4.7David Goulet
2022-10-27metrics: Treat relay connections as gauge, not counterDavid Goulet
Fixes #40699 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27metrics: Add number of opened circuits to MetricsPortDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27relay: Add our consensus relay flag to MetricsPortDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27metrics: Add traffic related stats to MetricsPortDavid Goulet
At this commit, bytes read and written are exported. Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27relay: Add DoS subsystem stats to MetricsPortDavid Goulet
Related to #40194 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-26relay: Change the connection metrics nameDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26relay: Add CC RTT reset stats to MetricsPortDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26relay: Add total number of streams seen on MetricsPortDavid 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-12relay: Add connection stats to MetricsPortDavid Goulet
This adds the number of created and opened connections to the MetricsPort for a relay for each connection type and direction. Output looks like: # HELP tor_relay_connections Connections metrics of this relay # TYPE tor_relay_connections counter tor_relay_connections{type="OR listener",direction="initiated",state="created"} 0 tor_relay_connections{type="OR listener",direction="received",state="created"} 0 tor_relay_connections{type="OR listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="OR listener",direction="received",state="opened"} 0 tor_relay_connections{type="OR",direction="initiated",state="created"} 5 tor_relay_connections{type="OR",direction="received",state="created"} 0 tor_relay_connections{type="OR",direction="initiated",state="opened"} 5 tor_relay_connections{type="OR",direction="received",state="opened"} 0 tor_relay_connections{type="Exit",direction="initiated",state="created"} 0 tor_relay_connections{type="Exit",direction="received",state="created"} 0 tor_relay_connections{type="Exit",direction="initiated",state="opened"} 0 tor_relay_connections{type="Exit",direction="received",state="opened"} 0 tor_relay_connections{type="Socks listener",direction="initiated",state="created"} 0 tor_relay_connections{type="Socks listener",direction="received",state="created"} 0 tor_relay_connections{type="Socks listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="Socks listener",direction="received",state="opened"} 0 tor_relay_connections{type="Socks",direction="initiated",state="created"} 0 tor_relay_connections{type="Socks",direction="received",state="created"} 0 tor_relay_connections{type="Socks",direction="initiated",state="opened"} 0 tor_relay_connections{type="Socks",direction="received",state="opened"} 0 tor_relay_connections{type="Directory listener",direction="initiated",state="created"} 0 tor_relay_connections{type="Directory listener",direction="received",state="created"} 0 tor_relay_connections{type="Directory listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="Directory listener",direction="received",state="opened"} 0 tor_relay_connections{type="Directory",direction="initiated",state="created"} 0 tor_relay_connections{type="Directory",direction="received",state="created"} 0 tor_relay_connections{type="Directory",direction="initiated",state="opened"} 0 tor_relay_connections{type="Directory",direction="received",state="opened"} 0 tor_relay_connections{type="Control listener",direction="initiated",state="created"} 0 tor_relay_connections{type="Control listener",direction="received",state="created"} 0 tor_relay_connections{type="Control listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="Control listener",direction="received",state="opened"} 0 tor_relay_connections{type="Control",direction="initiated",state="created"} 0 tor_relay_connections{type="Control",direction="received",state="created"} 0 tor_relay_connections{type="Control",direction="initiated",state="opened"} 0 tor_relay_connections{type="Control",direction="received",state="opened"} 0 tor_relay_connections{type="Transparent pf/netfilter listener",direction="initiated",state="created"} 0 tor_relay_connections{type="Transparent pf/netfilter listener",direction="received",state="created"} 0 tor_relay_connections{type="Transparent pf/netfilter listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="Transparent pf/netfilter listener",direction="received",state="opened"} 0 tor_relay_connections{type="Transparent natd listener",direction="initiated",state="created"} 0 tor_relay_connections{type="Transparent natd listener",direction="received",state="created"} 0 tor_relay_connections{type="Transparent natd listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="Transparent natd listener",direction="received",state="opened"} 0 tor_relay_connections{type="DNS listener",direction="initiated",state="created"} 0 tor_relay_connections{type="DNS listener",direction="received",state="created"} 0 tor_relay_connections{type="DNS listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="DNS listener",direction="received",state="opened"} 0 tor_relay_connections{type="Extended OR",direction="initiated",state="created"} 0 tor_relay_connections{type="Extended OR",direction="received",state="created"} 0 tor_relay_connections{type="Extended OR",direction="initiated",state="opened"} 0 tor_relay_connections{type="Extended OR",direction="received",state="opened"} 0 tor_relay_connections{type="Extended OR listener",direction="initiated",state="created"} 0 tor_relay_connections{type="Extended OR listener",direction="received",state="created"} 0 tor_relay_connections{type="Extended OR listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="Extended OR listener",direction="received",state="opened"} 0 tor_relay_connections{type="HTTP tunnel listener",direction="initiated",state="created"} 0 tor_relay_connections{type="HTTP tunnel listener",direction="received",state="created"} 0 tor_relay_connections{type="HTTP tunnel listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="HTTP tunnel listener",direction="received",state="opened"} 0 tor_relay_connections{type="Metrics listener",direction="initiated",state="created"} 0 tor_relay_connections{type="Metrics listener",direction="received",state="created"} 1 tor_relay_connections{type="Metrics listener",direction="initiated",state="opened"} 0 tor_relay_connections{type="Metrics listener",direction="received",state="opened"} 1 tor_relay_connections{type="Metrics",direction="initiated",state="created"} 0 tor_relay_connections{type="Metrics",direction="received",state="created"} 0 tor_relay_connections{type="Metrics",direction="initiated",state="opened"} 0 tor_relay_connections{type="Metrics",direction="received",state="opened"} 0 Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22Implement core of ntor3 negotiation.Nick Mathewson
There are a lot of TODOs about what to send, whom to send it to, and etc.
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: Comment out a unused variable for nowDavid Goulet
We keep it around until libevent is fixed, it should be used again. In the meantime, avoid the compiler to complain of this unused variable. https://gitlab.torproject.org/dgoulet/tor/-/jobs/43358#L1522 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-20relay: Avoid duplicate MetricsPort DNS errorDavid Goulet
We don't output per-type DNS errors anymore so avoid looping over the DNS query type and output each errors for them. Before this commit, it created 3x the same message because we had A, AAAA and PTR type records. Fix on previous commit e7abab878241592e Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-20relay: For metrics, don't report DNS errors by query typeDavid Goulet
This is due to the libevent bug https://github.com/libevent/libevent/issues/1219 that fails to return back the DNS record type on error. And so, the MetricsPort now only reports the errors as a global counter and not a per record type. Closes #40490 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-12metrics: One relay metrics was not using metrics_format_label()David Goulet
This resulted in the labels not being surrounded by double quotes and thus Prometheus not liking it. 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-12relay: Add DNS metricsDavid Goulet
Emit on the MetricsPort all the DNS statistics we have that is the total number of queries seen and errors per record type. Related to #40367 Signed-off-by: David Goulet <dgoulet@torproject.org>