Exemplo n.º 1
0
        private void EndRequest(object sender, EventArgs e)
        {
            IManagedTracer tracer = TracerManager.GetCurrentTracer();

            if (tracer == null)
            {
                return;
            }
            // End the span and annotate it with information from the current response.
            tracer.AnnotateSpan(Labels.FromHttpResponse(HttpContext.Current.Response));
            tracer.EndSpan();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the current <see cref="IManagedTracer"/> for the given request.
 /// </summary>
 public static IManagedTracer GetCurrentTracer()
 {
     return(TracerManager.GetCurrentTracer() ?? DoNothingTracer.Instance);
 }