public static IApplicationBuilder UseTracer(this IApplicationBuilder builder, TracerOptions tracerOptions) { return(builder.UseMiddleware <TracerMiddleware>(tracerOptions)); }
public TracerMiddleware(RequestDelegate next, IRequestScopedDataRepository requestScopedDataRepository, ITracerHandler tracer, TracerOptions tracerOptions) { _next = next; _requestScopedDataRepository = requestScopedDataRepository; _tracer = tracer; TracerKeys.Environment = tracerOptions.Environment; TracerKeys.SystemName = tracerOptions.SystemName; }