コード例 #1
0
        internal Span StartSpan(IApmAgent agent, IDbCommand dbCommand, InstrumentationFlag instrumentationFlag, string subType = null,
                                bool captureStackTraceOnStart = false
                                )
        {
            var spanName = dbCommand.CommandText.Replace(Environment.NewLine, " ");

            return(ExecutionSegmentCommon.StartSpanOnCurrentExecutionSegment(agent, spanName, ApiConstants.TypeDb, subType, instrumentationFlag,
                                                                             captureStackTraceOnStart));
        }
コード例 #2
0
        internal ISpan StartSpan(IApmAgent agent, IDbCommand dbCommand, InstrumentationFlag instrumentationFlag, string subType = null,
                                 bool captureStackTraceOnStart = false
                                 )
        {
            var spanName = GetDbSpanName(dbCommand);

            return(ExecutionSegmentCommon.StartSpanOnCurrentExecutionSegment(agent, spanName, ApiConstants.TypeDb, subType, instrumentationFlag,
                                                                             captureStackTraceOnStart, true));
        }
コード例 #3
0
 public void CaptureError(string message, string culprit, StackFrame[] frames, string parentId = null)
 => ExecutionSegmentCommon.CaptureError(
     message,
     culprit,
     frames,
     _sender,
     _logger,
     this,
     this,
     parentId
     );
コード例 #4
0
 public void CaptureException(Exception exception, string culprit = null, bool isHandled = false, string parentId = null)
 => ExecutionSegmentCommon.CaptureException(
     exception,
     _logger,
     _sender,
     this,
     this,
     culprit,
     isHandled,
     parentId
     );
コード例 #5
0
 public void CaptureError(string message, string culprit, StackFrame[] frames, string parentId = null)
 => ExecutionSegmentCommon.CaptureError(
     message,
     culprit,
     frames,
     _payloadSender,
     _logger,
     this,
     _enclosingTransaction,
     parentId
     );
コード例 #6
0
 public void CaptureException(Exception exception, string culprit = null, bool isHandled = false, string parentId = null)
 => ExecutionSegmentCommon.CaptureException(
     exception,
     _logger,
     _payloadSender,
     this,
     _enclosingTransaction,
     culprit,
     isHandled,
     parentId
     );
コード例 #7
0
 public void CaptureError(string message, string culprit, StackFrame[] frames, string parentId = null)
 => ExecutionSegmentCommon.CaptureError(
     message,
     culprit,
     frames,
     _payloadSender,
     _logger,
     this,
     ConfigSnapshot,
     _enclosingTransaction,
     parentId ?? (ShouldBeSentToApmServer ? null : _enclosingTransaction.Id)
     );
コード例 #8
0
 public void CaptureException(Exception exception, string culprit = null, bool isHandled = false, string parentId = null)
 => ExecutionSegmentCommon.CaptureException(
     exception,
     _logger,
     _payloadSender,
     this,
     ConfigSnapshot,
     _enclosingTransaction,
     culprit,
     isHandled,
     parentId ?? (ShouldBeSentToApmServer ? null : _enclosingTransaction.Id)
     );
コード例 #9
0
 public void CaptureErrorLog(ErrorLog errorLog, string parentId = null, Exception exception = null, Dictionary <string, Label> labels = null)
 => ExecutionSegmentCommon.CaptureErrorLog(
     errorLog,
     _payloadSender,
     _logger,
     this,
     ConfigSnapshot,
     _enclosingTransaction,
     parentId ?? (ShouldBeSentToApmServer ? null : _enclosingTransaction.Id),
     _apmServerInfo,
     exception,
     labels
     );
コード例 #10
0
 public void CaptureSpan(string name, string type, Action capturedAction, string subType = null, string action = null)
 => ExecutionSegmentCommon.CaptureSpan(new NoopSpan(name, type, subType, action, _currentExecutionSegmentsContainer), capturedAction);
コード例 #11
0
 public Task <T> CaptureSpan <T>(string name, string type, Func <ISpan, Task <T> > func, string subType = null, string action = null)
 => ExecutionSegmentCommon.CaptureSpan(StartSpanInternal(name, type, subType, action), func);
コード例 #12
0
 public void CaptureSpan(string name, string type, Action capturedAction, string subType = null, string action = null)
 => ExecutionSegmentCommon.CaptureSpan(StartSpanInternal(name, type, subType, action), capturedAction);
コード例 #13
0
ファイル: NoopSpan.cs プロジェクト: elastic/apm-agent-dotnet
 public Task <T> CaptureSpan <T>(string name, string type, Func <ISpan, Task <T> > func, string subType = null, string action = null,
                                 bool isExitSpan = false, IEnumerable <SpanLink> links = null
                                 )
 => ExecutionSegmentCommon.CaptureSpan(new NoopSpan(name, type, subType, action, _currentExecutionSegmentsContainer, Id, TraceId, this),
                                       func);
コード例 #14
0
ファイル: NoopSpan.cs プロジェクト: elastic/apm-agent-dotnet
 public void CaptureSpan(string name, string type, Action capturedAction, string subType = null, string action = null, bool isExitSpan = false,
                         IEnumerable <SpanLink> links = null
                         )
 => ExecutionSegmentCommon.CaptureSpan(new NoopSpan(name, type, subType, action, _currentExecutionSegmentsContainer, Id, TraceId, this),
                                       capturedAction);
コード例 #15
0
 public Task CaptureSpan(string name, string type, Func <Task> func, string subType = null, string action = null)
 => ExecutionSegmentCommon.CaptureSpan(new NoopSpan(name, type, subType, action, _currentExecutionSegmentsContainer), func);
コード例 #16
0
 public Task CaptureSpan(string name, string type, Func <Task> func, string subType = null, string action = null, bool isExitSpan = false)
 => ExecutionSegmentCommon.CaptureSpan(new NoopSpan(name, type, subType, action, _currentExecutionSegmentsContainer, Id, TraceId, this),
                                       func);
コード例 #17
0
 public Task <T> CaptureSpan <T>(string name, string type, Func <ISpan, Task <T> > func, string subType = null, string action = null)
 => ExecutionSegmentCommon.CaptureSpan(new NoopSpan(name, type, subType, action, _currentExecutionSegmentsContainer, Id, TraceId, this),
                                       func);
コード例 #18
0
 public Task <T> CaptureSpan <T>(string name, string type, Func <ISpan, Task <T> > func, string subType = null, string action = null, bool isExitSpan = false)
 => ExecutionSegmentCommon.CaptureSpan(new NoopSpan(name, type, subType, action, _currentExecutionSegmentsContainer), func);
コード例 #19
0
 internal Span StartSpan(IApmAgent agent, IDbCommand dbCommand) =>
 (Span)ExecutionSegmentCommon.GetCurrentExecutionSegment(agent).StartSpan(dbCommand.CommandText.Replace(Environment.NewLine, " ")
                                                                          , ApiConstants.TypeDb);