Пример #1
0
 public void AddBreadcrumb(string message)
 {
     breadcrumbs.Enqueue(new Breadcrumb(SentryUtils.GetTimestamp(), message));
     if (breadcrumbs.Count > options.MaxBreadcrumbs)
     {
         breadcrumbs.Dequeue();
     }
 }
Пример #2
0
        public void CaptureException(string condition, string stackTrace, LogType type)
        {
            var exc      = condition.Split(new char[] { ':' }, 2);
            var excType  = exc[0];
            var excValue = exc[1].Substring(1);

            List <StackTraceSpec> stackTraces = SentryUtils.GetStackTraces(stackTrace).ToList();
            SentryExceptionEvent  exception   = new SentryExceptionEvent(excType, excValue, GetBreadcrumbs(), stackTraces);

            Send(exception);
        }