Example #1
0
 public ErrorController(IOrganizationRepository organizationRepository, IProjectRepository projectRepository, IErrorStackRepository errorStackRepository, IErrorRepository repository)
 {
     _organizationRepository = organizationRepository;
     _projectRepository      = projectRepository;
     _errorStackRepository   = errorStackRepository;
     _repository             = repository;
 }
 public StatsController(ErrorStatsHelper statsHelper, IOrganizationRepository organizationRepository, IErrorStackRepository errorStackRepository, IProjectRepository projectRepository, ICacheClient cacheClient) {
     _cacheClient = cacheClient;
     _statsHelper = statsHelper;
     _organizationRepository = organizationRepository;
     _errorStackRepository = errorStackRepository;
     _projectRepository = projectRepository;
 }
 public StatsController(ErrorStatsHelper statsHelper, IOrganizationRepository organizationRepository, IErrorStackRepository errorStackRepository, IProjectRepository projectRepository, ICacheClient cacheClient)
 {
     _cacheClient            = cacheClient;
     _statsHelper            = statsHelper;
     _organizationRepository = organizationRepository;
     _errorStackRepository   = errorStackRepository;
     _projectRepository      = projectRepository;
 }
 public QueueNotificationAction(IMessageFactory messageFactory, IProjectHookRepository projectHookRepository,
                                IOrganizationRepository organizationRepository, IProjectRepository projectRepository, IErrorStackRepository errorStackRepository)
 {
     _messageFactory         = messageFactory;
     _projectHookRepository  = projectHookRepository;
     _organizationRepository = organizationRepository;
     _projectRepository      = projectRepository;
     _errorStackRepository   = errorStackRepository;
 }
Example #5
0
        public static WebHookError FromError(ErrorPipelineContext ctx, IProjectRepository projectRepository, IErrorStackRepository errorStackRepository, IOrganizationRepository organizationRepository) {
            if (ctx == null || ctx.Error == null)
                throw new ArgumentNullException("ctx");

            if (projectRepository == null)
                throw new ArgumentNullException("projectRepository");

            if (errorStackRepository == null)
                throw new ArgumentNullException("errorStackRepository");

            if (organizationRepository == null)
                throw new ArgumentNullException("organizationRepository");

            var project = projectRepository.GetByIdCached(ctx.Error.ProjectId);
            if (project == null)
                throw new ArgumentException("ProjectId not found.");

            var organization = organizationRepository.GetByIdCached(ctx.Error.OrganizationId);
            if (organization == null)
                throw new ArgumentException("OrganizationId not found.");

            var errorStack = errorStackRepository.GetByIdCached(ctx.Error.ErrorStackId);
            if (errorStack == null)
                throw new ArgumentException("ErrorStackId not found.");

            return new WebHookError {
                Id = ctx.Error.Id,
                OccurrenceDate = ctx.Error.OccurrenceDate,
                Tags = ctx.Error.Tags,
                MachineName = ctx.Error.EnvironmentInfo != null ? ctx.Error.EnvironmentInfo.MachineName : null,
                RequestPath = ctx.Error.RequestInfo != null ? ctx.Error.RequestInfo.GetFullPath() : null,
                IpAddress = ctx.Error.RequestInfo != null ? ctx.Error.RequestInfo.ClientIpAddress : ctx.Error.EnvironmentInfo != null ? ctx.Error.EnvironmentInfo.IpAddress : null,
                Message = ctx.Error.Message,
                Type = ctx.Error.Type,
                Code = ctx.Error.Code,
                TargetMethod = ctx.Error.TargetMethod != null ? ctx.Error.TargetMethod.FullName : null,
                ProjectId = ctx.Error.ProjectId,
                ProjectName = project.Name,
                OrganizationId = ctx.Error.OrganizationId,
                OrganizationName = organization.Name,
                ErrorStackId = ctx.Error.ErrorStackId,
                ErrorStackTitle = errorStack.Title,
                ErrorStackDescription = errorStack.Description,
                ErrorStackTags = errorStack.Tags,
                TotalOccurrences = errorStack.TotalOccurrences,
                FirstOccurrence = errorStack.FirstOccurrence,
                LastOccurrence = errorStack.LastOccurrence,
                DateFixed = errorStack.DateFixed,
                IsRegression = ctx.IsRegression,
                IsNew = ctx.IsNew
            };
        }
 public RemoveStaleAccountsJob(OrganizationRepository organizationRepository,
     IProjectRepository projectRepository,
     IUserRepository userRepository,
     IErrorRepository errorRepository,
     IErrorStackRepository errorStackRepository,
     DayStackStatsRepository dayStackStats,
     MonthStackStatsRepository monthStackStats,
     DayProjectStatsRepository dayProjectStats,
     MonthProjectStatsRepository monthProjectStats) {
     _organizationRepository = organizationRepository;
     _projectRepository = projectRepository;
     _userRepository = userRepository;
     _errorRepository = errorRepository;
     _errorStackRepository = errorStackRepository;
     _dayStackStats = dayStackStats;
     _monthStackStats = monthStackStats;
     _dayProjectStats = dayProjectStats;
     _monthProjectStats = monthProjectStats;
 }
 public RemoveStaleAccountsJob(OrganizationRepository organizationRepository,
                               IProjectRepository projectRepository,
                               IUserRepository userRepository,
                               IErrorRepository errorRepository,
                               IErrorStackRepository errorStackRepository,
                               DayStackStatsRepository dayStackStats,
                               MonthStackStatsRepository monthStackStats,
                               DayProjectStatsRepository dayProjectStats,
                               MonthProjectStatsRepository monthProjectStats)
 {
     _organizationRepository = organizationRepository;
     _projectRepository      = projectRepository;
     _userRepository         = userRepository;
     _errorRepository        = errorRepository;
     _errorStackRepository   = errorStackRepository;
     _dayStackStats          = dayStackStats;
     _monthStackStats        = monthStackStats;
     _dayProjectStats        = dayProjectStats;
     _monthProjectStats      = monthProjectStats;
 }
        public ExceptionlessMqServer(IRedisClientsManager clientsManager, IProjectRepository projectRepository, IUserRepository userRepository,
            IErrorStackRepository stackRepository, IOrganizationRepository organizationRepository, ErrorPipeline errorPipeline,
            ErrorStatsHelper errorStatsHelper, IProjectHookRepository projectHookRepository, ICacheClient cacheClient, IMailer mailer, IAppStatsClient stats)
            : base(clientsManager) {
            _projectRepository = projectRepository;
            _projectHookRepository = projectHookRepository;
            _userRepository = userRepository;
            _stackRepository = stackRepository;
            _organizationRepository = organizationRepository;
            _errorPipeline = errorPipeline;
            _errorStatsHelper = errorStatsHelper;
            _cacheClient = cacheClient;
            _mailer = mailer;
            _stats = stats;

            RegisterHandler<SummaryNotification>(ProcessSummaryNotification, ProcessSummaryNotificationException);
            RegisterHandler<ErrorNotification>(ProcessNotification, ProcessNotificationException);
            RegisterHandler<Error>(ProcessError, ProcessErrorException);
            RegisterHandler<WebHookNotification>(ProcessWebHookNotification, ProcessWebHookNotificationException);
        }
Example #9
0
        public ExceptionlessMqServer(IRedisClientsManager clientsManager, IProjectRepository projectRepository, IUserRepository userRepository,
                                     IErrorStackRepository stackRepository, IOrganizationRepository organizationRepository, ErrorPipeline errorPipeline,
                                     ErrorStatsHelper errorStatsHelper, IProjectHookRepository projectHookRepository, ICacheClient cacheClient, IMailer mailer, IAppStatsClient stats)
            : base(clientsManager)
        {
            _projectRepository      = projectRepository;
            _projectHookRepository  = projectHookRepository;
            _userRepository         = userRepository;
            _stackRepository        = stackRepository;
            _organizationRepository = organizationRepository;
            _errorPipeline          = errorPipeline;
            _errorStatsHelper       = errorStatsHelper;
            _cacheClient            = cacheClient;
            _mailer = mailer;
            _stats  = stats;

            RegisterHandler <SummaryNotification>(ProcessSummaryNotification, ProcessSummaryNotificationException);
            RegisterHandler <ErrorNotification>(ProcessNotification, ProcessNotificationException);
            RegisterHandler <Error>(ProcessError, ProcessErrorException);
            RegisterHandler <WebHookNotification>(ProcessWebHookNotification, ProcessWebHookNotificationException);
        }
Example #10
0
        public static WebHookError FromError(ErrorPipelineContext ctx, IProjectRepository projectRepository, IErrorStackRepository errorStackRepository, IOrganizationRepository organizationRepository)
        {
            if (ctx == null || ctx.Error == null)
            {
                throw new ArgumentNullException("ctx");
            }

            if (projectRepository == null)
            {
                throw new ArgumentNullException("projectRepository");
            }

            if (errorStackRepository == null)
            {
                throw new ArgumentNullException("errorStackRepository");
            }

            if (organizationRepository == null)
            {
                throw new ArgumentNullException("organizationRepository");
            }

            var project = projectRepository.GetByIdCached(ctx.Error.ProjectId);

            if (project == null)
            {
                throw new ArgumentException("ProjectId not found.");
            }

            var organization = organizationRepository.GetByIdCached(ctx.Error.OrganizationId);

            if (organization == null)
            {
                throw new ArgumentException("OrganizationId not found.");
            }

            var errorStack = errorStackRepository.GetByIdCached(ctx.Error.ErrorStackId);

            if (errorStack == null)
            {
                throw new ArgumentException("ErrorStackId not found.");
            }

            return(new WebHookError {
                Id = ctx.Error.Id,
                OccurrenceDate = ctx.Error.OccurrenceDate,
                Tags = ctx.Error.Tags,
                MachineName = ctx.Error.EnvironmentInfo != null ? ctx.Error.EnvironmentInfo.MachineName : null,
                RequestPath = ctx.Error.RequestInfo != null?ctx.Error.RequestInfo.GetFullPath() : null,
                                  IpAddress = ctx.Error.RequestInfo != null ? ctx.Error.RequestInfo.ClientIpAddress : ctx.Error.EnvironmentInfo != null ? ctx.Error.EnvironmentInfo.IpAddress : null,
                                  Message = ctx.Error.Message,
                                  Type = ctx.Error.Type,
                                  Code = ctx.Error.Code,
                                  TargetMethod = ctx.Error.TargetMethod != null ? ctx.Error.TargetMethod.FullName : null,
                                  ProjectId = ctx.Error.ProjectId,
                                  ProjectName = project.Name,
                                  OrganizationId = ctx.Error.OrganizationId,
                                  OrganizationName = organization.Name,
                                  ErrorStackId = ctx.Error.ErrorStackId,
                                  ErrorStackTitle = errorStack.Title,
                                  ErrorStackDescription = errorStack.Description,
                                  ErrorStackTags = errorStack.Tags,
                                  TotalOccurrences = errorStack.TotalOccurrences,
                                  FirstOccurrence = errorStack.FirstOccurrence,
                                  LastOccurrence = errorStack.LastOccurrence,
                                  DateFixed = errorStack.DateFixed,
                                  IsRegression = ctx.IsRegression,
                                  IsNew = ctx.IsNew
            });
        }
Example #11
0
 public StackController(IErrorStackRepository repository)
 {
     _repository = repository;
 }
Example #12
0
 public StackController(IErrorStackRepository repository) {
     _repository = repository;
 }
Example #13
0
 public ErrorController(IOrganizationRepository organizationRepository, IProjectRepository projectRepository, IErrorStackRepository errorStackRepository, IErrorRepository repository) {
     _organizationRepository = organizationRepository;
     _projectRepository = projectRepository;
     _errorStackRepository = errorStackRepository;
     _repository = repository;
 }