Ejemplo n.º 1
0
        public static ISpan Exception(this ISpan span, Exception exception)
        {
            if (span == null)
            {
                return(span);
            }

            if (exception == null)
            {
                throw new ArgumentNullException(nameof(exception));
            }
            span.ErrorOccurred();
            span.Log(LogField.CreateNew().EventError().ErrorKind(exception).Message(exception.Message).Stack(exception.StackTrace));
            return(span);
        }