Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AspNetInstrumentation"/> class.
 /// </summary>
 /// <param name="tracer">Tracer to record traced with.</param>
 /// <param name="options">Configuration options for ASP.NET instrumentation.</param>
 public AspNetInstrumentation(Tracer tracer, AspNetInstrumentationOptions options)
 {
     this.diagnosticSourceSubscriber = new DiagnosticSourceSubscriber(
         name => new HttpInListener(name, tracer, options),
         listener => listener.Name == AspNetDiagnosticListenerName,
         null);
     this.diagnosticSourceSubscriber.Subscribe();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AspNetInstrumentation"/> class.
 /// </summary>
 /// <param name="activitySource">ActivitySource adapter instance.</param>
 /// <param name="options">Configuration options for ASP.NET instrumentation.</param>
 public AspNetInstrumentation(ActivitySourceAdapter activitySource, AspNetInstrumentationOptions options)
 {
     this.diagnosticSourceSubscriber = new DiagnosticSourceSubscriber(
         name => new HttpInListener(name, options, activitySource),
         listener => listener.Name == AspNetDiagnosticListenerName,
         null);
     this.diagnosticSourceSubscriber.Subscribe();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AspNetInstrumentation"/> class.
 /// </summary>
 /// <param name="options">Configuration options for ASP.NET instrumentation.</param>
 public AspNetInstrumentation(AspNetInstrumentationOptions options)
 {
     this.httpInListener = new HttpInListener(options);
 }