diff options
Diffstat (limited to 'src/feature/relay/relay_metrics.c')
-rw-r--r-- | src/feature/relay/relay_metrics.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/feature/relay/relay_metrics.c b/src/feature/relay/relay_metrics.c index 07f89fc043..82abeeeee5 100644 --- a/src/feature/relay/relay_metrics.c +++ b/src/feature/relay/relay_metrics.c @@ -166,21 +166,24 @@ fill_dns_error_values(void) static const size_t num_errors = ARRAY_LENGTH(errors); for (size_t i = 0; i < num_dns_types; i++) { + /* NOTE: Disable the record type label until libevent is fixed. */ +#if 0 /* Dup the label because metrics_format_label() returns a pointer to a * string on the stack and we need that label for all metrics. */ char *record_label = tor_strdup(metrics_format_label("record", dns_types[i].name)); +#endif for (size_t j = 0; j < num_errors; j++) { sentry = metrics_store_add(the_store, rentry->type, rentry->name, rentry->help); - metrics_store_entry_add_label(sentry, record_label); + //metrics_store_entry_add_label(sentry, record_label); metrics_store_entry_add_label(sentry, metrics_format_label("reason", errors[j].name)); metrics_store_entry_update(sentry, rep_hist_get_n_dns_error(dns_types[i].type, errors[j].key)); } - tor_free(record_label); + //tor_free(record_label); } } @@ -192,6 +195,8 @@ fill_dns_query_values(void) const relay_metrics_entry_t *rentry = &base_metrics[RELAY_METRICS_NUM_DNS]; + /* NOTE: Disable the record type label until libevent is fixed (#40490). */ +#if 0 for (size_t i = 0; i < num_dns_types; i++) { /* Dup the label because metrics_format_label() returns a pointer to a * string on the stack and we need that label for all metrics. */ @@ -204,6 +209,11 @@ fill_dns_query_values(void) rep_hist_get_n_dns_request(dns_types[i].type)); tor_free(record_label); } +#endif + + sentry = metrics_store_add(the_store, rentry->type, rentry->name, + rentry->help); + metrics_store_entry_update(sentry, rep_hist_get_n_dns_request(0)); } /** Fill function for the RELAY_METRICS_NUM_GLOBAL_RW_LIMIT metrics. */ |