Closed SergeyKanzhelev closed 5 years ago
@pakrym Can you a review here? I have some changes locally that re-baselines on .NET Standard 2.0 and the 2.0 version of logging. Where I'm currently stuck is trying to figure out how to implement AddApplicationInsights on ILoggerBuilder. We need a bunch of services here and I was messing with this:
public static ILoggingBuilder AddApplicationInsights(this ILoggingBuilder builder)
{
builder.Services.TryAddSingleton<TelemetryClient>();
builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerProvider, ApplicationInsightsLoggerProvider>());
return builder;
}
This needs to compose with the method in the ASP.NET Core SDK so that things work if you call AddApplicationInsights directly or UseApplicationInsights on the IWebHostBuilder.
This PR is to collect the feedback
CC: @davidfowl