public static LoggerConfiguration ApplicationInsightsExtension(this LoggerSinkConfiguration sinkConfiguration, string roleName, string roleInstance, LogEventLevel restrictedToMinimumLevel) { _roleName = roleName; _roleInstance = roleInstance; return(sinkConfiguration.ApplicationInsights(TelemetryConfiguration.Active, ConvertLogEventsToCustomTraceTelemetry, restrictedToMinimumLevel)); }
public static LoggerConfiguration ApplicationInsightsWithStandardLoggersForTraceTelemetry(this LoggerSinkConfiguration sinkConfiguration, string appInsightsInstrumentationkey) { return(sinkConfiguration.ApplicationInsights(appInsightsInstrumentationkey, (Func <LogEvent, IFormatProvider, ITelemetry>)LogEventConverters.ConvertLogEventsToTraceTelemetryWithContext)); }