hickory-resolver 0.26.0

hickory-resolver is a safe and secure DNS stub resolver library intended to be a high-level library for DNS record resolution.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
// Copyright 2015-2026 Benjamin Fry <benjaminfry@me.com>
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

//! Metrics related to resolver and recursive resolver operations

use metrics::{
    Counter, Gauge, Histogram, Unit, counter, describe_counter, describe_gauge, describe_histogram,
    gauge, histogram,
};

use hickory_net::xfer::Protocol;

#[derive(Clone, Default)]
pub(crate) struct ResolverMetrics {
    outgoing_queries: ProtocolMetrics,
}

impl ResolverMetrics {
    pub(crate) fn increment_outgoing_query(&self, proto: &Protocol) {
        self.outgoing_queries.increment(proto);
    }
}

#[derive(Clone)]
struct ProtocolMetrics {
    udp: Counter,
    tcp: Counter,
    #[cfg(feature = "__tls")]
    tls: Counter,
    #[cfg(feature = "__https")]
    https: Counter,
    #[cfg(feature = "__quic")]
    quic: Counter,
    #[cfg(feature = "__h3")]
    h3: Counter,
}

impl ProtocolMetrics {
    fn increment(&self, proto: &Protocol) {
        match proto {
            Protocol::Udp => self.udp.increment(1),
            Protocol::Tcp => self.tcp.increment(1),
            #[cfg(feature = "__tls")]
            Protocol::Tls => self.tls.increment(1),
            #[cfg(feature = "__https")]
            Protocol::Https => self.https.increment(1),
            #[cfg(feature = "__quic")]
            Protocol::Quic => self.quic.increment(1),
            #[cfg(feature = "__h3")]
            Protocol::H3 => self.h3.increment(1),
            _ => {}
        }
    }
}

impl Default for ProtocolMetrics {
    fn default() -> Self {
        describe_counter!(
            OUTGOING_QUERIES_TOTAL,
            Unit::Count,
            "Number of outgoing resolver queries by transport protocol"
        );

        let key = "protocol";
        Self {
            udp: counter!(OUTGOING_QUERIES_TOTAL, key => "udp"),
            tcp: counter!(OUTGOING_QUERIES_TOTAL, key => "tcp"),
            #[cfg(feature = "__tls")]
            tls: counter!(OUTGOING_QUERIES_TOTAL, key => "tls"),
            #[cfg(feature = "__https")]
            https: counter!(OUTGOING_QUERIES_TOTAL, key => "https"),
            #[cfg(feature = "__quic")]
            quic: counter!(OUTGOING_QUERIES_TOTAL, key => "quic"),
            #[cfg(feature = "__h3")]
            h3: counter!(OUTGOING_QUERIES_TOTAL, key => "http3"),
        }
    }
}

/// Metrics for the resolver's response cache.
#[derive(Clone, Debug)]
pub(crate) struct CacheMetrics {
    pub(crate) cache_hit: Counter,
    pub(crate) cache_miss: Counter,
    pub(crate) cache_hit_duration: Histogram,
    pub(crate) cache_miss_duration: Histogram,
    pub(crate) cache_size: Gauge,
}

impl Default for CacheMetrics {
    fn default() -> Self {
        describe_counter!(
            CACHE_HIT_TOTAL,
            Unit::Count,
            "Number of resolver requests answered from the cache."
        );
        describe_counter!(
            CACHE_MISS_TOTAL,
            Unit::Count,
            "Number of resolver requests that could not be answered from the cache."
        );
        describe_histogram!(
            CACHE_HIT_DURATION,
            Unit::Seconds,
            "Duration of resolver lookups answered from the cache."
        );
        describe_histogram!(
            CACHE_MISS_DURATION,
            Unit::Seconds,
            "Duration of resolver lookups that could not be answered from the cache."
        );
        describe_gauge!(
            RESPONSE_CACHE_SIZE,
            Unit::Count,
            "Number of entries in the resolver response cache."
        );

        Self {
            cache_hit: counter!(CACHE_HIT_TOTAL),
            cache_miss: counter!(CACHE_MISS_TOTAL),
            cache_hit_duration: histogram!(CACHE_HIT_DURATION),
            cache_miss_duration: histogram!(CACHE_MISS_DURATION),
            cache_size: gauge!(RESPONSE_CACHE_SIZE),
        }
    }
}

/// Number of outgoing resolver queries by transport protocol.
pub const OUTGOING_QUERIES_TOTAL: &str = "hickory_resolver_outgoing_queries_total";

/// Number of resolver requests answered from the cache.
pub const CACHE_HIT_TOTAL: &str = "hickory_resolver_cache_hit_total";

/// Number of resolver requests that could not be answered from the cache.
pub const CACHE_MISS_TOTAL: &str = "hickory_resolver_cache_miss_total";

/// Duration of resolver lookups answered from the cache.
pub const CACHE_HIT_DURATION: &str = "hickory_resolver_cache_hit_duration_seconds";

/// Duration of resolver lookups that could not be answered from the cache.
pub const CACHE_MISS_DURATION: &str = "hickory_resolver_cache_miss_duration_seconds";

/// Number of entries in the resolver response cache.
pub const RESPONSE_CACHE_SIZE: &str = "hickory_resolver_response_cache_size";

/// Metrics for the optional recursive resolver feature
#[cfg(feature = "recursor")]
pub mod recursor {
    use std::sync::{
        Arc,
        atomic::{AtomicUsize, Ordering},
    };

    #[cfg(feature = "__dnssec")]
    use hickory_proto::{dnssec::Proof, op::Message};
    use metrics::{
        Counter, Gauge, Histogram, Unit, counter, describe_counter, describe_gauge,
        describe_histogram, gauge, histogram,
    };

    #[derive(Clone)]
    pub(crate) struct RecursorMetrics {
        pub(crate) cache_hit_counter: Counter,
        pub(crate) cache_miss_counter: Counter,
        pub(crate) outgoing_query_counter: Counter,
        pub(crate) cache_hit_duration: Histogram,
        pub(crate) cache_miss_duration: Histogram,
        pub(crate) cache_size: Gauge,
        pub(crate) name_server_cache_size: Gauge,
        pub(crate) connection_cache_size: Gauge,
        pub(crate) in_flight_queries: Gauge,
        pub(crate) in_flight_queries_count: Arc<AtomicUsize>,
        #[cfg(feature = "__dnssec")]
        pub(crate) validated_cache_size: Gauge,
        #[cfg(feature = "__dnssec")]
        pub(crate) dnssec_metrics: DnssecRecursorMetrics,
    }

    impl RecursorMetrics {
        pub(crate) fn new() -> Self {
            let cache_hit_counter = counter!(CACHE_HIT_TOTAL);
            describe_counter!(
                CACHE_HIT_TOTAL,
                Unit::Count,
                "Number of recursive requests answered from the cache."
            );
            let cache_miss_counter = counter!(CACHE_MISS_TOTAL);
            describe_counter!(
                CACHE_MISS_TOTAL,
                Unit::Count,
                "Number of recursive requests that could not be answered from the cache."
            );
            let outgoing_query_counter = counter!(OUTGOING_QUERIES_TOTAL);
            describe_counter!(
                OUTGOING_QUERIES_TOTAL,
                Unit::Count,
                "Number of outgoing queries made during resolution."
            );
            let cache_hit_duration = histogram!(CACHE_HIT_DURATION);
            describe_histogram!(
                CACHE_HIT_DURATION,
                Unit::Seconds,
                "Duration of recursive resolution for queries that are answered from cache."
            );
            let cache_miss_duration = histogram!(CACHE_MISS_DURATION);
            describe_histogram!(
                CACHE_MISS_DURATION,
                Unit::Seconds,
                "Duration of recursive resolution for queries that are not answered from cache."
            );
            let cache_size = gauge!(RESPONSE_CACHE_SIZE);
            describe_gauge!(
                RESPONSE_CACHE_SIZE,
                Unit::Count,
                "Number of entries in the response cache."
            );
            let name_server_cache_size = gauge!(NAME_SERVER_CACHE_SIZE);
            describe_gauge!(
                NAME_SERVER_CACHE_SIZE,
                Unit::Count,
                "Number of entries in the name server cache."
            );
            let connection_cache_size = gauge!(CONNECTION_CACHE_SIZE);
            describe_gauge!(
                CONNECTION_CACHE_SIZE,
                Unit::Count,
                "Number of entries in the connection cache."
            );
            let in_flight_queries = gauge!(IN_FLIGHT_QUERIES);
            describe_gauge!(
                IN_FLIGHT_QUERIES,
                Unit::Count,
                "Number of in-flight recursive queries currently being processed."
            );
            #[cfg(feature = "__dnssec")]
            let validated_cache_size = gauge!(VALIDATED_RESPONSE_CACHE_SIZE);
            #[cfg(feature = "__dnssec")]
            describe_gauge!(
                VALIDATED_RESPONSE_CACHE_SIZE,
                Unit::Count,
                "Number of entries in the DNSSEC validated response cache."
            );
            Self {
                cache_hit_counter,
                cache_miss_counter,
                outgoing_query_counter,
                cache_hit_duration,
                cache_miss_duration,
                cache_size,
                name_server_cache_size,
                connection_cache_size,
                in_flight_queries,
                in_flight_queries_count: Arc::new(AtomicUsize::default()),
                #[cfg(feature = "__dnssec")]
                validated_cache_size,
                #[cfg(feature = "__dnssec")]
                dnssec_metrics: DnssecRecursorMetrics::default(),
            }
        }
    }

    impl RecursorMetrics {
        /// Track that a new in-flight recursive resolver query has started.
        ///
        /// The returned RAII guard ensures the overall count of in-flight queries
        /// is properly maintained once the query completes.
        pub(crate) fn new_inflight_query(&self) -> InFlightGuard {
            InFlightGuard::new(&self.in_flight_queries_count, &self.in_flight_queries)
        }
    }

    #[cfg(feature = "__dnssec")]
    #[derive(Clone)]
    pub(crate) struct DnssecRecursorMetrics {
        pub(crate) secure_answers_counter: Counter,
        pub(crate) insecure_answers_counter: Counter,
        pub(crate) bogus_answers_counter: Counter,
        pub(crate) indeterminate_answers_counter: Counter,
    }

    #[cfg(feature = "__dnssec")]
    impl DnssecRecursorMetrics {
        pub(crate) fn increment_proof_counter(&self, response: &Message) {
            match response
                .answers
                .iter()
                .map(|record| record.proof)
                .min()
                .unwrap_or(Proof::Indeterminate)
            {
                Proof::Secure => self.secure_answers_counter.increment(1),
                Proof::Insecure => self.insecure_answers_counter.increment(1),
                Proof::Bogus => self.bogus_answers_counter.increment(1),
                Proof::Indeterminate => self.indeterminate_answers_counter.increment(1),
            }
        }
    }

    #[cfg(feature = "__dnssec")]
    impl Default for DnssecRecursorMetrics {
        fn default() -> Self {
            let secure_answers_counter = counter!(SECURE_ANSWERS_TOTAL);
            describe_counter!(
                SECURE_ANSWERS_TOTAL,
                Unit::Count,
                "Number of recursive requests with answers that were DNSSEC validated as secure"
            );

            let insecure_answers_counter = counter!(INSECURE_ANSWERS_TOTAL);
            describe_counter!(
                INSECURE_ANSWERS_TOTAL,
                Unit::Count,
                "Number of recursive requests with answers that were DNSSEC validated as insecure"
            );

            let bogus_answers_counter = counter!(BOGUS_ANSWERS_TOTAL);
            describe_counter!(
                BOGUS_ANSWERS_TOTAL,
                Unit::Count,
                "Number of recursive requests with answers that were DNSSEC validated as bogus"
            );

            let indeterminate_answers_counter = counter!(INDETERMINATE_ANSWERS_TOTAL);
            describe_counter!(
                INDETERMINATE_ANSWERS_TOTAL,
                Unit::Count,
                "Number of recursive requests with answers that were DNSSEC validated as indeterminate"
            );

            Self {
                secure_answers_counter,
                insecure_answers_counter,
                bogus_answers_counter,
                indeterminate_answers_counter,
            }
        }
    }

    /// RAII guard that tracks in-flight recursive resolver queries for metrics.
    ///
    /// The atomic value is reported via a Gauge.
    pub(crate) struct InFlightGuard {
        counter: Arc<AtomicUsize>,
        gauge: Gauge,
    }

    impl InFlightGuard {
        fn new(counter: &Arc<AtomicUsize>, gauge: &Gauge) -> Self {
            let count = counter.fetch_add(1, Ordering::SeqCst) + 1;
            gauge.set(count as f64);
            Self {
                counter: counter.clone(),
                gauge: gauge.clone(),
            }
        }
    }

    impl Drop for InFlightGuard {
        fn drop(&mut self) {
            let count = self.counter.fetch_sub(1, Ordering::SeqCst) - 1;
            self.gauge.set(count as f64);
        }
    }

    /// Number of recursive requests answered from the cache.
    pub const CACHE_HIT_TOTAL: &str = "hickory_recursor_cache_hit_total";

    /// Number of recursive requests that could not be answered from the cache.
    pub const CACHE_MISS_TOTAL: &str = "hickory_recursor_cache_miss_total";

    /// Number of outgoing queries made during resolution.
    pub const OUTGOING_QUERIES_TOTAL: &str = "hickory_recursor_outgoing_queries_total";

    /// Duration of recursive resolution for queries that are answered from cache.
    pub const CACHE_HIT_DURATION: &str = "hickory_recursor_cache_hit_duration_seconds";

    /// Duration of recursive resolution for queries that are not answered from cache.
    pub const CACHE_MISS_DURATION: &str = "hickory_recursor_cache_miss_duration_seconds";

    /// Number of entries in the response cache.
    pub const RESPONSE_CACHE_SIZE: &str = "hickory_recursor_response_cache_size";

    /// Number of entries in the name server cache.
    pub const NAME_SERVER_CACHE_SIZE: &str = "hickory_recursor_name_server_cache_size";

    /// Number of entries in the connection cache.
    pub const CONNECTION_CACHE_SIZE: &str = "hickory_recursor_connection_cache_size";

    /// Number of in-flight recursive queries currently being processed.
    pub const IN_FLIGHT_QUERIES: &str = "hickory_recursor_in_flight_queries";

    /// Number of entries in the DNSSEC validated response cache.
    #[cfg(feature = "__dnssec")]
    pub const VALIDATED_RESPONSE_CACHE_SIZE: &str =
        "hickory_recursor_validated_response_cache_size";

    /// Number of recursive requests with answers that were DNSSEC validated as secure.
    #[cfg(feature = "__dnssec")]
    pub const SECURE_ANSWERS_TOTAL: &str = "hickory_recursor_dnssec_secure_answers_total";

    /// Number of recursive requests with answers that were DNSSEC validated as insecure.
    #[cfg(feature = "__dnssec")]
    pub const INSECURE_ANSWERS_TOTAL: &str = "hickory_recursor_dnssec_insecure_answers_total";

    /// Number of recursive requests with answers that were DNSSEC validated as bogus.
    #[cfg(feature = "__dnssec")]
    pub const BOGUS_ANSWERS_TOTAL: &str = "hickory_recursor_dnssec_bogus_answers_total";

    /// Number of recursive requests with answers that were DNSSEC validated as indeterminate.
    #[cfg(feature = "__dnssec")]
    pub const INDETERMINATE_ANSWERS_TOTAL: &str =
        "hickory_recursor_dnssec_indeterminate_answers_total";
}

/// Metrics for the optional resolver opportunistic encryption feature
#[cfg(any(feature = "__tls", feature = "__quic"))]
pub mod opportunistic_encryption {
    use std::time::Duration;

    use metrics::{
        Counter, Gauge, Histogram, Unit, counter, describe_counter, describe_gauge,
        describe_histogram, gauge, histogram,
    };
    use tracing::warn;

    use hickory_net::{NetError, xfer::Protocol};

    #[derive(Clone)]
    pub(crate) struct ProbeMetrics {
        pub(crate) probe_budget: Gauge,
        #[cfg(feature = "__tls")]
        tls_probe_metrics: ProbeProtocolMetrics,
        #[cfg(feature = "__quic")]
        quic_probe_metrics: ProbeProtocolMetrics,
    }

    impl ProbeMetrics {
        pub(crate) fn increment_attempts(&self, proto: Protocol) {
            match proto {
                #[cfg(feature = "__tls")]
                Protocol::Tls => self.tls_probe_metrics.probe_attempts.increment(1),
                #[cfg(feature = "__quic")]
                Protocol::Quic => self.quic_probe_metrics.probe_attempts.increment(1),
                _ => {
                    warn!("probe protocol {proto} not supported for metrics");
                }
            }
        }

        pub(crate) fn increment_errors(&self, proto: Protocol, err: &NetError) {
            match (&err, proto) {
                #[cfg(feature = "__tls")]
                (NetError::Timeout, Protocol::Tls) => {
                    self.tls_probe_metrics.probe_timeouts.increment(1)
                }
                #[cfg(feature = "__tls")]
                (_, Protocol::Tls) => self.tls_probe_metrics.probe_errors.increment(1),
                #[cfg(feature = "__quic")]
                (NetError::Timeout, Protocol::Quic) => {
                    self.quic_probe_metrics.probe_timeouts.increment(1)
                }
                #[cfg(feature = "__quic")]
                (_, Protocol::Quic) => self.quic_probe_metrics.probe_errors.increment(1),
                _ => {
                    warn!("probe protocol {proto} not supported for metrics");
                }
            }
        }

        pub(crate) fn increment_successes(&self, proto: Protocol) {
            match proto {
                #[cfg(feature = "__tls")]
                Protocol::Tls => self.tls_probe_metrics.probe_successes.increment(1),
                #[cfg(feature = "__quic")]
                Protocol::Quic => self.quic_probe_metrics.probe_successes.increment(1),
                _ => {
                    warn!("probe protocol {proto} not supported for metrics");
                }
            }
        }

        pub(crate) fn record_probe_duration(&self, proto: Protocol, duration: Duration) {
            match proto {
                #[cfg(feature = "__tls")]
                Protocol::Tls => self.tls_probe_metrics.probe_duration.record(duration),
                #[cfg(feature = "__quic")]
                Protocol::Quic => self.tls_probe_metrics.probe_duration.record(duration),
                _ => {
                    warn!("probe protocol {proto} not supported for metrics");
                }
            }
        }
    }

    impl Default for ProbeMetrics {
        fn default() -> Self {
            describe_gauge!(
                PROBE_BUDGET_TOTAL,
                Unit::Count,
                "Count of remaining opportunistic encrypted name server probe requests allowed by budget."
            );
            let probe_budget = gauge!(PROBE_BUDGET_TOTAL);

            Self {
                #[cfg(feature = "__tls")]
                tls_probe_metrics: ProbeProtocolMetrics::new(Protocol::Tls),
                #[cfg(feature = "__quic")]
                quic_probe_metrics: ProbeProtocolMetrics::new(Protocol::Quic),
                probe_budget,
            }
        }
    }

    #[derive(Clone)]
    struct ProbeProtocolMetrics {
        probe_attempts: Counter,
        probe_errors: Counter,
        probe_timeouts: Counter,
        probe_successes: Counter,
        probe_duration: Histogram,
    }

    impl ProbeProtocolMetrics {
        fn new(protocol: Protocol) -> Self {
            describe_counter!(
                PROBE_ATTEMPTS_TOTAL,
                Unit::Count,
                "Number of opportunistic encrypted name server probe requests attempted."
            );
            let probe_attempts = counter!(PROBE_ATTEMPTS_TOTAL, "protocol" => protocol.to_string());

            describe_counter!(
                PROBE_ERRORS_TOTAL,
                Unit::Count,
                "Number of opportunistic encrypted name server probe requests that failed due to an error."
            );
            let probe_errors = counter!(PROBE_ERRORS_TOTAL, "protocol" => protocol.to_string());

            describe_counter!(
                PROBE_TIMEOUTS_TOTAL,
                Unit::Count,
                "Number of opportunistic encrypted name server probe requests that failed due to a timeout."
            );
            let probe_timeouts = counter!(PROBE_TIMEOUTS_TOTAL, "protocol" => protocol.to_string());

            describe_counter!(
                PROBE_SUCCESSES_TOTAL,
                Unit::Count,
                "Number of opportunistic encrypted name server probe requests that succeeded"
            );
            let probe_successes =
                counter!(PROBE_SUCCESSES_TOTAL, "protocol" => protocol.to_string());

            describe_histogram!(
                PROBE_DURATION_SECONDS,
                Unit::Seconds,
                "Duration of opportunistic encryption probe request"
            );
            let probe_duration =
                histogram!(PROBE_DURATION_SECONDS, "protocol" => protocol.to_string());

            Self {
                probe_attempts,
                probe_errors,
                probe_timeouts,
                probe_successes,
                probe_duration,
            }
        }
    }

    /// Count of remaining opportunistic encrypted name server probe requests allowed by budget.
    pub const PROBE_BUDGET_TOTAL: &str = "hickory_resolver_probe_budget_total";

    /// Number of opportunistic encrypted name server probe requests attempted.
    pub const PROBE_ATTEMPTS_TOTAL: &str = "hickory_resolver_probe_attempts_total";

    /// Number of opportunistic encrypted name server probe requests that failed due to an error.
    pub const PROBE_ERRORS_TOTAL: &str = "hickory_resolver_probe_errors_total";

    /// Number of opportunistic encrypted name server probe requests that failed due to a timeout.
    pub const PROBE_TIMEOUTS_TOTAL: &str = "hickory_resolver_probe_timeouts_total";

    /// Number of opportunistic encrypted name server probe requests that succeeded.
    pub const PROBE_SUCCESSES_TOTAL: &str = "hickory_resolver_probe_successes_total";

    /// Duration of opportunistic encryption probe request.
    pub const PROBE_DURATION_SECONDS: &str = "hickory_resolver_probe_duration_seconds";
}