-
Notifications
You must be signed in to change notification settings - Fork 812
/
NameResolutionMetrics.cs
34 lines (27 loc) · 1.02 KB
/
NameResolutionMetrics.cs
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
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
namespace Yarp.Telemetry.Consumption;
/// <summary>
/// Represents metrics reported by the System.Net.NameResolution event counters.
/// </summary>
public sealed class NameResolutionMetrics
{
public NameResolutionMetrics() => Timestamp = DateTime.UtcNow;
/// <summary>
/// Timestamp of when this <see cref="NameResolutionMetrics"/> instance was created.
/// </summary>
public DateTime Timestamp { get; internal set; }
/// <summary>
/// Number of DNS lookups requested since telemetry was enabled.
/// </summary>
public long DnsLookupsRequested { get; internal set; }
/// <summary>
/// Average DNS lookup duration in the last metrics interval.
/// </summary>
public TimeSpan AverageLookupDuration { get; internal set; }
/// <summary>
/// Number of DNS lookups that have started but not yet completed or failed.
/// </summary>
public long CurrentDnsLookups { get; internal set; }
}