public void StackOnSpanClosed(object sender, SpanEventArgs spanEventArgs)
 {
     if (!_executingIISPreStartInit)
     {
         RemoveLastCorrelationIdentifierContext();
     }
 }
 public void RegisterNLogEnricher(object sender, SpanEventArgs spanEventArgs)
 {
     if (!_executingIISPreStartInit)
     {
         SetNLogLogContext();
     }
 }
 public void StackOnSpanOpened(object sender, SpanEventArgs spanEventArgs)
 {
     if (!_executingIISPreStartInit)
     {
         SetSerilogCompatibleLogContext(spanEventArgs.Span.TraceId, spanEventArgs.Span.SpanId);
     }
 }
Example #4
0
 private void MixedCodeDataControl_SpanLeave(object sender, SpanEventArgs e)
 {
     if (!insidePreview)
     {
         DestroyPreviewWindow();
     }
 }
 public void MapOnTraceEnded(object sender, SpanEventArgs spanEventArgs)
 {
     if (!_executingIISPreStartInit)
     {
         RemoveAllCorrelationIdentifierContexts();
         SetDefaultValues();
     }
 }
 public void MapOnSpanActivated(object sender, SpanEventArgs spanEventArgs)
 {
     if (!_executingIISPreStartInit)
     {
         RemoveAllCorrelationIdentifierContexts();
         SetLogContext(spanEventArgs.Span.TraceId, spanEventArgs.Span.SpanId);
     }
 }
 public void ClearNLogEnricher(object sender, SpanEventArgs spanEventArgs)
 {
     if (!_executingIISPreStartInit)
     {
         if (_tracer.ActiveScope == null)
         {
             // We closed the last span
             _currentEnricher.Get()?.Dispose();
             _currentEnricher.Set(null);
         }
     }
 }
        public void OnTraceStarted_RefreshIISState(object sender, SpanEventArgs spanEventArgs)
        {
            // If we were previously executing in the IIS PreApp Code, refresh this evaluation
            // If not, do not waste cycles
            if (_executingIISPreStartInit)
            {
                RefreshIISPreAppState(traceId: spanEventArgs.Span.TraceId);
            }

            if (!_executingIISPreStartInit)
            {
                _scopeManager.TraceStarted -= OnTraceStarted_RefreshIISState;
            }
        }
Example #9
0
        public Scope Activate(Span span, bool finishOnClose)
        {
            var newParent       = Active;
            var scope           = new Scope(newParent, span, this, finishOnClose);
            var scopeOpenedArgs = new SpanEventArgs(span);

            SpanOpened?.Invoke(this, scopeOpenedArgs);

            SetScope(scope);

            if (newParent != null)
            {
                SpanDeactivated?.Invoke(this, new SpanEventArgs(newParent.Span));
            }

            SpanActivated?.Invoke(this, scopeOpenedArgs);

            return(scope);
        }
Example #10
0
        private void MixedCodeDataControl_SpanEnter(object sender, SpanEventArgs e)
        {
            if (previewWindow != null)
            {
                // Preview window already visible.
                return;
            }

            if (e.Span.Style == null || !e.Span.Style.Contains("dasm-addrText"))
            {
                return;
            }
            this.addressPreview = e.Span.Tag as Address;
            if (this.addressPreview == null)
            {
                return;
            }

            // Start the timer; when it ticks, it will pop up the window.
            this.previewTimer.Enabled = true;
            this.previewSpan          = e.Span;
        }
 public void MapOnTraceEnded(object sender, SpanEventArgs spanEventArgs)
 {
     RemoveAllCorrelationIdentifierContexts();
     SetDefaultValues();
 }
 public void StackOnSpanClosed(object sender, SpanEventArgs spanEventArgs)
 {
     RemoveLastCorrelationIdentifierContext();
 }
 public void MapOnSpanActivated(object sender, SpanEventArgs spanEventArgs)
 {
     RemoveAllCorrelationIdentifierContexts();
     SetLogContext(_defaultServiceName, _version, _env, spanEventArgs.Span.TraceId, spanEventArgs.Span.SpanId);
 }
Example #14
0
 public void MapOnTraceEnded(object sender, SpanEventArgs spanEventArgs)
 {
     RemoveAllCorrelationIdentifierContexts();
     SetCorrelationIdentifierContext(new LogCorrelationFields());
 }
 public void StackOnSpanOpened(object sender, SpanEventArgs spanEventArgs)
 {
     SetSerilogCompatibleLogContext(_defaultServiceName, _version, _env, spanEventArgs.Span.TraceId, spanEventArgs.Span.SpanId);
 }
Example #16
0
 public void MapOnSpanActivated(object sender, SpanEventArgs spanEventArgs)
 {
     RemoveAllCorrelationIdentifierContexts();
     SetCorrelationIdentifierContext(new LogCorrelationFields(spanEventArgs.Span));
 }
Example #17
0
 public void StackOnSpanOpened(object sender, SpanEventArgs spanEventArgs)
 {
     SetCorrelationIdentifierContext(new LogCorrelationFields(spanEventArgs.Span));
 }
 public void MapOnSpanActivated(object sender, SpanEventArgs spanEventArgs)
 {
     RemoveAllCorrelationIdentifierContexts();
     SetCorrelationIdentifierContext(spanEventArgs.Span.TraceId, spanEventArgs.Span.SpanId);
 }
 public void StackOnSpanOpened(object sender, SpanEventArgs spanEventArgs)
 {
     SetCorrelationIdentifierContext(spanEventArgs.Span.TraceId, spanEventArgs.Span.SpanId);
 }
 public void StackOnSpanOpened(object sender, SpanEventArgs spanEventArgs)
 {
     SetCorrelationIdentifierContext(_defaultServiceName, _version, _env, spanEventArgs.Span.TraceId, spanEventArgs.Span.SpanId);
 }