Add EventSource/EventCounter tracing and metrics for DependencyInjection
analogrelay opened this issue · comments
The primary goal here is to give users insight as to when services are constructed and how many services they have active in their application. This can be useful when correlated to requests and helps give more insight into memory issues.
There is also a useful effect of putting EventSource
s in DI. Since DI is below Logging in the dependency graph, it has no logging. However, EventSource
is in corefx, which means DI can use it.
I'm going to do this one via a PR rather than listing proposed counters since it's relatively simple.
See https://gist.github.com/anurse/af1859663ac91c6cf69c820cebe92303 for some guidance on adding EventSource
s and EventCounter
s to ASP.NET projects.
This issue was moved to dotnet/aspnetcore#2330