Ejemplo n.º 1
0
        public ElasticSearchService(DumpRepository dumpRepo, BundleRepository bundleRepo, PathHelper pathHelper, IOptions <SuperDumpSettings> settings,
                                    IOneAgentSdk dynatraceSdk)
        {
            this.dumpRepo   = dumpRepo ?? throw new NullReferenceException("DumpRepository must not be null!");
            this.bundleRepo = bundleRepo ?? throw new NullReferenceException("BundleRepository must not be null!");
            this.pathHelper = pathHelper ?? throw new NullReferenceException("PathHelper must not be null!");

            this.dynatraceSdk   = dynatraceSdk;
            messagingSystemInfo = dynatraceSdk.CreateMessagingSystemInfo("Hangfire", "elasticsearch", MessageDestinationType.QUEUE, ChannelType.IN_PROCESS, null);

            string host = settings.Value.ElasticSearchHost;

            if (string.IsNullOrEmpty(host))
            {
                elasticClient = null;
                return;
            }
            ConnectionSettings connSettings = new ConnectionSettings(new Uri(settings.Value.ElasticSearchHost));

            ((IConnectionSettingsValues)connSettings).DefaultIndices.Add(typeof(ElasticSDResult), RESULT_IDX);

            elasticClient = new ElasticClient(connSettings);

            if (!IndexExists())
            {
                CreateIndex();
            }
        }
Ejemplo n.º 2
0
 public DumpRetentionService(DumpRepository dumpRepo, BundleRepository bundleRepo, PathHelper pathHelper, IOptions <SuperDumpSettings> settings, JiraIssueRepository jiraIssueRepository)
 {
     this.dumpRepo            = dumpRepo ?? throw new ArgumentNullException("Dump Repository must not be null!");
     this.bundleRepo          = bundleRepo ?? throw new ArgumentNullException("Bundle Repository must not be null!");
     this.pathHelper          = pathHelper ?? throw new ArgumentException("PathHelper must not be null!");
     this.jiraIssueRepository = jiraIssueRepository;
     this.settings            = settings?.Value ?? throw new ArgumentException("Settings must not be null!");
 }
Ejemplo n.º 3
0
 public AnalysisService(DumpStorageFilebased dumpStorage, DumpRepository dumpRepo, BundleRepository bundleRepo, PathHelper pathHelper, IOptions <SuperDumpSettings> settings, NotificationService notifications, ElasticSearchService elasticSearch)
 {
     this.dumpStorage   = dumpStorage;
     this.dumpRepo      = dumpRepo;
     this.bundleRepo    = bundleRepo;
     this.pathHelper    = pathHelper;
     this.settings      = settings;
     this.notifications = notifications;
     this.elasticSearch = elasticSearch;
 }
Ejemplo n.º 4
0
 public SearchService(
     BundleRepository bundleRepo,
     DumpRepository dumpRepo,
     SimilarityService similarityService,
     ElasticSearchService elasticService)
 {
     this.bundleRepo        = bundleRepo;
     this.dumpRepo          = dumpRepo;
     this.similarityService = similarityService;
     this.elasticService    = elasticService;
 }
Ejemplo n.º 5
0
 public JiraIssueRepository(IOptions <SuperDumpSettings> settings,
                            IJiraApiService apiService,
                            BundleRepository bundleRepo,
                            IJiraIssueStorage jiraIssueStorage,
                            IdenticalDumpRepository identicalDumpRepository,
                            ILoggerFactory loggerFactory)
 {
     this.apiService              = apiService;
     this.bundleRepo              = bundleRepo;
     this.jiraIssueStorage        = jiraIssueStorage;
     this.identicalDumpRepository = identicalDumpRepository;
     this.settings = settings.Value.JiraIntegrationSettings;
     logger        = loggerFactory.CreateLogger <JiraIssueRepository>();
 }
Ejemplo n.º 6
0
 public SearchService(
     BundleRepository bundleRepo,
     DumpRepository dumpRepo,
     SimilarityService similarityService,
     ElasticSearchService elasticService,
     IOptions <SuperDumpSettings> settings,
     JiraIssueRepository jiraIssueRepository)
 {
     this.bundleRepo          = bundleRepo;
     this.dumpRepo            = dumpRepo;
     this.similarityService   = similarityService;
     this.elasticService      = elasticService;
     this.jiraIssueRepository = jiraIssueRepository;
     this.settings            = settings.Value;
 }
Ejemplo n.º 7
0
 public AnalysisService(
     DumpRepository dumpRepo,
     BundleRepository bundleRepo,
     PathHelper pathHelper,
     NotificationService notifications,
     AnalyzerPipeline analyzerPipeline,
     IOneAgentSdk dynatraceSdk
     )
 {
     this.dumpRepo         = dumpRepo;
     this.bundleRepo       = bundleRepo;
     this.pathHelper       = pathHelper;
     this.notifications    = notifications;
     this.analyzerPipeline = analyzerPipeline;
     this.dynatraceSdk     = dynatraceSdk;
     messagingSystemInfo   = dynatraceSdk.CreateMessagingSystemInfo("Hangfire", "analysis", MessageDestinationType.QUEUE, ChannelType.IN_PROCESS, null);
 }
Ejemplo n.º 8
0
 public SuperDumpRepository(
     IOptions <SuperDumpSettings> settings,
     BundleRepository bundleRepo,
     DumpRepository dumpRepo,
     AnalysisService analysisService,
     DownloadService downloadService,
     SymStoreService symStoreService,
     UnpackService unpackService,
     PathHelper pathHelper)
 {
     this.settings        = settings;
     this.bundleRepo      = bundleRepo;
     this.dumpRepo        = dumpRepo;
     this.analysisService = analysisService;
     this.downloadService = downloadService;
     this.symStoreService = symStoreService;
     this.unpackService   = unpackService;
     this.pathHelper      = pathHelper;
     pathHelper.PrepareDirectories();
 }
Ejemplo n.º 9
0
        public ElasticSearchService(DumpRepository dumpRepo, BundleRepository bundleRepo, IOptions <SuperDumpSettings> settings)
        {
            this.dumpRepo   = dumpRepo;
            this.bundleRepo = bundleRepo;

            string host = settings.Value.ElasticSearchHost;

            if (string.IsNullOrEmpty(host))
            {
                elasticClient = null;
                return;
            }
            ConnectionSettings connSettings = new ConnectionSettings(new Uri(settings.Value.ElasticSearchHost))
                                              .MapDefaultTypeIndices(m => m.Add(typeof(ElasticSDResult), RESULT_IDX));

            elasticClient = new ElasticClient(connSettings);

            if (!elasticClient.IndexExists(RESULT_IDX).Exists)
            {
                elasticClient.CreateIndex(RESULT_IDX, i => i.Mappings(m => m.Map <ElasticSDResult>(ms => ms.AutoMap())));
            }
        }
Ejemplo n.º 10
0
 public AnalysisService(
     IDumpStorage dumpStorage,
     DumpRepository dumpRepo,
     BundleRepository bundleRepo,
     PathHelper pathHelper,
     IOptions <SuperDumpSettings> settings,
     NotificationService notifications,
     ElasticSearchService elasticSearch,
     SimilarityService similarityService,
     IOneAgentSdk dynatraceSdk
     )
 {
     this.dumpStorage       = dumpStorage;
     this.dumpRepo          = dumpRepo;
     this.bundleRepo        = bundleRepo;
     this.pathHelper        = pathHelper;
     this.settings          = settings;
     this.notifications     = notifications;
     this.elasticSearch     = elasticSearch;
     this.similarityService = similarityService;
     this.dynatraceSdk      = dynatraceSdk;
     messagingSystemInfo    = dynatraceSdk.CreateMessagingSystemInfo("Hangfire", "analysis", MessageDestinationType.QUEUE, ChannelType.IN_PROCESS, null);
 }
Ejemplo n.º 11
0
        public ElasticSearchService(DumpRepository dumpRepo, BundleRepository bundleRepo, PathHelper pathHelper, IOptions <SuperDumpSettings> settings)
        {
            this.dumpRepo   = dumpRepo ?? throw new NullReferenceException("DumpRepository must not be null!");
            this.bundleRepo = bundleRepo ?? throw new NullReferenceException("BundleRepository must not be null!");
            this.pathHelper = pathHelper ?? throw new NullReferenceException("PathHelper must not be null!");

            string host = settings.Value.ElasticSearchHost;

            if (string.IsNullOrEmpty(host))
            {
                elasticClient = null;
                return;
            }
            ConnectionSettings connSettings = new ConnectionSettings(new Uri(settings.Value.ElasticSearchHost))
                                              .MapDefaultTypeIndices(m => m.Add(typeof(ElasticSDResult), RESULT_IDX));

            elasticClient = new ElasticClient(connSettings);

            if (!IndexExists())
            {
                CreateIndex();
            }
        }
Ejemplo n.º 12
0
        private static async Task <DumpViewModel> ToDumpViewModel(DumpMetainfo dumpMetainfo, DumpRepository dumpRepo, BundleRepository bundleRepo, SimilarityService similarityService = null)
        {
            if (dumpMetainfo == null)
            {
                return(null);
            }
            var similarities = similarityService == null ? null : new Similarities(await similarityService.GetSimilarities(dumpMetainfo.Id));

            return(new DumpViewModel(dumpMetainfo, new BundleViewModel(bundleRepo.Get(dumpMetainfo.BundleId)), similarities));
        }
Ejemplo n.º 13
0
 private static async Task <DumpViewModel> ToDumpViewModel(DumpIdentifier id, DumpRepository dumpRepo, BundleRepository bundleRepo, SimilarityService similarityService = null)
 {
     return(await ToDumpViewModel(dumpRepo.Get(id), dumpRepo, bundleRepo, similarityService));
 }
Ejemplo n.º 14
0
 private static async Task <DumpViewModel> ToDumpViewModel(ElasticSDResult elasticSDResult, DumpRepository dumpRepo, BundleRepository bundleRepo, SimilarityService similarityService = null)
 {
     return(await ToDumpViewModel(elasticSDResult.DumpIdentifier, dumpRepo, bundleRepo, similarityService));
 }
Ejemplo n.º 15
0
 public IdenticalDumpRepository(IIdenticalDumpStorage identicalDumpStorage, BundleRepository bundleRepo)
 {
     this.identicalDumpStorage = identicalDumpStorage;
     this.bundleRepo           = bundleRepo;
 }
Ejemplo n.º 16
0
 public DumpRepository(DumpStorageFilebased storage, BundleRepository bundleRepo, PathHelper pathHelper)
 {
     this.storage    = storage;
     this.bundleRepo = bundleRepo;
     this.pathHelper = pathHelper;
 }
Ejemplo n.º 17
0
 public FaultReportingService(IFaultReportSender faultReportSender, DumpRepository dumpRepository, BundleRepository bundleRepository)
 {
     this.faultReportSender = faultReportSender;
     this.dumpRepository    = dumpRepository;
     this.bundleRepository  = bundleRepository;
 }