You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ah, I didn't see that one. That's the "Number of Dns requests issued" I was asking for.
Something like current-dns-lookups seems reasonable ... the meaning of this would likely be "number of not-finished Dns.Foo(...) calls"
Yes, if we're already tracking number of requests initiated, then if we also tracked number of requests finished, it would be the difference.
I assume the tracking of "unique" would be duplicated between the Telemetry impl and a potential #48566 impl?
There might be some duplication, but whatever we do for #48566 is likely to only apply to a portion of requests, e.g. those that are implemented by queueing work items to the thread pool. On Windows most if not all requests will instead be implemented with async OS functionality, and we wouldn't do any such uniqueness tracking for the implementation. Longer term, we'd expect that to be true for all OSes.
How many unique DNS addresses are resolved in an application’s lifetime?
What is a developer going to do with this information? Doing this "perfectly" would be a leak, as it would require the application to maintain a set of every address it saw; that's not viable (it'd be like Kestrel having a counter for how many unique client addresses connected to it over the process' lifetime). Events are already emitted for that information, so a dev can post-process that information from traces if needed. #48885 (this issue) proposes one for the number of unique addresses currently being resolved; from my perspective, that's more reasonable, though I'm not sure how actionable it actually is, either.
Is there any low hanging fruit here we could tackle for .NET 6? I think the unique dns requests are difficult and we can punt for now, but it would be ideal to add some of the other counters.
This is something I would like to get done for .NET 8 now that we're moving to metrics. Specifically, a Meter in System.Net that reports the number of DNS resolutions with a host name dimension.
@davidfowl is DNS the only area you find critical in .NET 8 to define Metrics for, or is there anything from #88383 and #88384 you want us to get done?
HTTP counters: #88384 and DNS counters are the most important. The socket and TLS ones I think can wait. Specifically, the counters you cannot write yourselves are the most important for us to add (the connection pooling data that exists inside of SocketHttpHandler's guts).
Activity
[-]Dns event counters[/-][+]Add Dns event counters[/+]MihaZupan commentedon Mar 1, 2021
Right now we have
dns-lookups-requested- DNS Lookups Requested (total counter)dns-lookups-duration- Average DNS Lookup DurationSomething like
current-dns-lookupsseems reasonable - we have that forNet.SecurityandNet.Httpas well.With #48566 in mind, the meaning of this would likely be "number of not-finished
Dns.Foo(...)calls".I assume the tracking of "unique" would be duplicated between the Telemetry impl and a potential #48566 impl?
stephentoub commentedon Mar 1, 2021
Ah, I didn't see that one. That's the "Number of Dns requests issued" I was asking for.
Yes, if we're already tracking number of requests initiated, then if we also tracked number of requests finished, it would be the difference.
There might be some duplication, but whatever we do for #48566 is likely to only apply to a portion of requests, e.g. those that are implemented by queueing work items to the thread pool. On Windows most if not all requests will instead be implemented with async OS functionality, and we wouldn't do any such uniqueness tracking for the implementation. Longer term, we'd expect that to be true for all OSes.
ManickaP commentedon Mar 4, 2021
Triage: shouldn't be hard to implement, the numbers might be useful. We would want
current-dns-lookupsfor 6.0.MihaZupan commentedon Jul 21, 2021
Currently implemented:
Start/Failed/StopeventsFailedcould use some additional info such as the exception message - right now it's just an empty eventdns-lookups-requested(total for process)current-dns-lookups(current)dns-lookups-duration(average time taken for lookups within the last counter period)Not yet added:
Potential:
karelz commentedon Jul 21, 2021
Taking the discussion from #56072 (comment) here:
We should answer:
@davidfowl can you respond here please to @stephentoub's comment above?
Moving the issue to 6.0 to make decision what to do in 6.0.
5 remaining items
danmoseley commentedon Aug 4, 2021
@davidfowl can you ack or push back here to help us make the right call?
davidfowl commentedon Aug 5, 2021
Is there any low hanging fruit here we could tackle for .NET 6? I think the unique dns requests are difficult and we can punt for now, but it would be ideal to add some of the other counters.
MihaZupan commentedon Jul 18, 2022
The "Number of unique DNS requests currently in flight" counter doesn't seem critical for 7.0. Moving to future.
@davidfowl did you have any other counters in mind (aside from those mentioned in #48885 (comment))?
davidfowl commentedon Jul 9, 2023
This is something I would like to get done for .NET 8 now that we're moving to metrics. Specifically, a Meter in System.Net that reports the number of DNS resolutions with a host name dimension.
antonfirsov commentedon Jul 11, 2023
@davidfowl is DNS the only area you find critical in .NET 8 to define Metrics for, or is there anything from #88383 and #88384 you want us to get done?
davidfowl commentedon Jul 11, 2023
HTTP counters: #88384 and DNS counters are the most important. The socket and TLS ones I think can wait. Specifically, the counters you cannot write yourselves are the most important for us to add (the connection pooling data that exists inside of SocketHttpHandler's guts).
antonfirsov commentedon Jul 12, 2023
That should be all covered by #84978, #88384 is mostly about extras.
davidfowl commentedon Jul 12, 2023
Perfect, then I think the DNS one is the next most important one to add that isn't currently tracked for .NET 8.