If a call that ends up in Dns.RunAsync() is canceled, nothing ever calls NameResolutionTelemetry.AfterResolution() and so the variable NameResolutionTelemetry._currentLookups remains forever incremented by one.
The unmatched BeforeResolution() is called in Dns.RunAsync() here: https://github.com/dotnet/runtime/blob/9101b853a1f5194de3e7bc495454a57df0da300e/src/libraries/System.Net.NameResolution/src/System/Net/Dns.cs#L652C16-L652C16

If a call that ends up in
Dns.RunAsync()is canceled, nothing ever callsNameResolutionTelemetry.AfterResolution()and so the variableNameResolutionTelemetry._currentLookupsremains forever incremented by one.The unmatched
BeforeResolution()is called inDns.RunAsync()here: https://github.com/dotnet/runtime/blob/9101b853a1f5194de3e7bc495454a57df0da300e/src/libraries/System.Net.NameResolution/src/System/Net/Dns.cs#L652C16-L652C16