Exemplo n.º 1
0
 public AnalysisService(DumpStorageFilebased dumpStorage, DumpRepository dumpRepo, PathHelper pathHelper, IOptions <SuperDumpSettings> settings)
 {
     this.dumpStorage = dumpStorage;
     this.dumpRepo    = dumpRepo;
     this.pathHelper  = pathHelper;
     this.settings    = settings;
 }
Exemplo n.º 2
0
        public SuperDumpRepository(
            IOptions <SuperDumpSettings> settings,
            BundleRepository bundleRepo,
            DumpRepository dumpRepo,
            AnalysisService analysisService,
            DownloadService downloadService,
            SymStoreService symStoreService,
            UnpackService unpackService,
            PathHelper pathHelper,
            IdenticalDumpRepository identicalRepository,
            IOneAgentSdk dynatraceSdk)
        {
            this.settings            = settings;
            this.bundleRepo          = bundleRepo;
            this.dumpRepo            = dumpRepo;
            this.analysisService     = analysisService;
            this.downloadService     = downloadService;
            this.symStoreService     = symStoreService;
            this.unpackService       = unpackService;
            this.pathHelper          = pathHelper;
            this.identicalRepository = identicalRepository;
            pathHelper.PrepareDirectories();

            this.dynatraceSdk   = dynatraceSdk;
            messagingSystemInfo = dynatraceSdk.CreateMessagingSystemInfo("Hangfire", "download", MessageDestinationType.QUEUE, ChannelType.IN_PROCESS, null);
        }
Exemplo n.º 3
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();
            }
        }
 public RelationshipRepository(IRelationshipStorage relationshipStorage, DumpRepository dumpRepo, IOptions <SuperDumpSettings> settings)
 {
     this.relationshipStorage = relationshipStorage;
     this.dumpRepo            = dumpRepo;
     this.settings            = settings;
     this.dirtyDumps          = new HashSet <DumpIdentifier>();
 }
Exemplo n.º 5
0
 public DumpRetentionService(DumpRepository dumpRepo, BundleRepository bundleRepo, PathHelper pathHelper, IOptions <SuperDumpSettings> settings)
 {
     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.settings   = settings?.Value ?? throw new ArgumentException("Settings must not be null!");
 }
 public SlackNotificationService(IOptions <SuperDumpSettings> settings, DumpRepository dumpRepo)
 {
     this.superDumpUrl = settings.Value.SuperDumpUrl;
     this.webhookUrls  = settings.Value.SlackNotificationUrls;
     this.channel      = settings.Value.SlackChannel;
     this.dumpRepo     = dumpRepo;
 }
Exemplo n.º 7
0
        public SimilarityService(DumpRepository dumpRepo, RelationshipRepository relationShipRepository, IOptions <SuperDumpSettings> settings,
                                 IOneAgentSdk dynatraceSdk)
        {
            this.dumpRepo         = dumpRepo;
            this.relationShipRepo = relationShipRepository;
            this.settings         = settings;

            this.dynatraceSdk   = dynatraceSdk;
            messagingSystemInfo = dynatraceSdk.CreateMessagingSystemInfo("Hangfire", "similarityanalysis", MessageDestinationType.QUEUE, ChannelType.IN_PROCESS, null);
        }
Exemplo n.º 8
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;
 }
Exemplo n.º 9
0
 public SearchService(
     BundleRepository bundleRepo,
     DumpRepository dumpRepo,
     SimilarityService similarityService,
     ElasticSearchService elasticService)
 {
     this.bundleRepo        = bundleRepo;
     this.dumpRepo          = dumpRepo;
     this.similarityService = similarityService;
     this.elasticService    = elasticService;
 }
Exemplo n.º 10
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;
 }
Exemplo n.º 11
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);
 }
Exemplo n.º 12
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();
 }
Exemplo n.º 13
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())));
            }
        }
Exemplo n.º 14
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();
            }
        }
Exemplo n.º 15
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);
 }
Exemplo n.º 16
0
 public BundleRepository(IBundleStorage storage, DumpRepository dumpRepository)
 {
     this.storage        = storage;
     this.dumpRepository = dumpRepository;
 }
Exemplo n.º 17
0
 public SimilarityService(DumpRepository dumpRepo, RelationshipRepository relationShipRepository)
 {
     this.dumpRepo         = dumpRepo;
     this.relationShipRepo = relationShipRepository;
 }
Exemplo n.º 18
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));
        }
Exemplo n.º 19
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));
 }
Exemplo n.º 20
0
 private static async Task <DumpViewModel> ToDumpViewModel(ElasticSDResult elasticSDResult, DumpRepository dumpRepo, BundleRepository bundleRepo, SimilarityService similarityService = null)
 {
     return(await ToDumpViewModel(elasticSDResult.DumpIdentifier, dumpRepo, bundleRepo, similarityService));
 }
Exemplo n.º 21
0
 public RelationshipRepository(RelationshipStorageFilebased relationshipStorage, DumpRepository dumpRepo)
 {
     this.relationshipStorage = relationshipStorage;
     this.dumpRepo            = dumpRepo;
 }
Exemplo n.º 22
0
 public FaultReportingService(IFaultReportSender faultReportSender, DumpRepository dumpRepository, BundleRepository bundleRepository)
 {
     this.faultReportSender = faultReportSender;
     this.dumpRepository    = dumpRepository;
     this.bundleRepository  = bundleRepository;
 }