Beispiel #1
0
 internal Scope(Scope parent, Span span, AsyncLocalScopeManager scopeManager, bool finishOnClose)
 {
     Parent         = parent;
     Span           = span;
     _scopeManager  = scopeManager;
     _finishOnClose = finishOnClose;
 }
Beispiel #2
0
        internal Tracer(IAgentWriter agentWriter, string defaultServiceName = null, bool isDebugEnabled = false)
        {
            _isDebugEnabled    = isDebugEnabled;
            _agentWriter       = agentWriter;
            DefaultServiceName = defaultServiceName ?? CreateDefaultServiceName() ?? UnknownServiceName;

            // Register callbacks to make sure we flush the traces before exiting
            AppDomain.CurrentDomain.ProcessExit        += CurrentDomain_ProcessExit;
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            Console.CancelKeyPress += Console_CancelKeyPress;
            _scopeManager           = new AsyncLocalScopeManager();
        }