public static void ErrorOccurred(this SegmentSpan span, Exception exception, TracingConfig tracingConfig) { if (span == null) { return; } span.IsError = true; if (exception == null) { return; } if (tracingConfig == null) { tracingConfig = new TracingConfig(); } var stackTrace = exception.HasInnerExceptions() ? exception.ToDemystifiedString(tracingConfig.ExceptionMaxDepth) : exception.StackTrace; span.AddLog(LogEvent.Event("error"), LogEvent.ErrorKind(exception.GetType().FullName), LogEvent.Message(exception.Message), LogEvent.ErrorStack(stackTrace)); }
public SegmentContext(long traceId, long segmentId, bool sampled, string serviceName, string operationName, SpanType spanType, string identity) { TraceId = traceId; Sampled = sampled; SegmentId = segmentId; ServiceName = serviceName; Identity = identity; Span = new SegmentSpan(operationName, spanType); }
public static void ErrorOccurred(this SegmentSpan span) { if (span == null) { return; } span.IsError = true; }
public SegmentContext(UniqueId traceId, UniqueId segmentId, bool sampled, int serviceId, int serviceInstanceId, string operationName, SpanType spanType) { TraceId = traceId; Sampled = sampled; SegmentId = segmentId; ServiceId = serviceId; ServiceInstanceId = serviceInstanceId; Span = new SegmentSpan(operationName, spanType); }
public static void ErrorOccurred(this SegmentSpan span, Exception exception = null) { if (span == null) { return; } span.IsError = true; if (exception != null) { span.AddLog(LogEvent.Event("error"), LogEvent.ErrorKind(exception.GetType().FullName), LogEvent.Message(exception.Message), LogEvent.ErrorStack(exception.StackTrace)); } }
public static void ErrorOccurred(this SegmentSpan span, Exception exception = null) { span.ErrorOccurred(exception, null); }