コード例 #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;
 }
コード例 #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);
        }
コード例 #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();
            }
        }
コード例 #4
0
 public RelationshipRepository(IRelationshipStorage relationshipStorage, DumpRepository dumpRepo, IOptions <SuperDumpSettings> settings)
 {
     this.relationshipStorage = relationshipStorage;
     this.dumpRepo            = dumpRepo;
     this.settings            = settings;
     this.dirtyDumps          = new HashSet <DumpIdentifier>();
 }
コード例 #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!");
 }
コード例 #6
0
 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;
 }
コード例 #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);
        }
コード例 #8
0
ファイル: AnalysisService.cs プロジェクト: jbmercha/superdump
 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;
 }
コード例 #9
0
 public SearchService(
     BundleRepository bundleRepo,
     DumpRepository dumpRepo,
     SimilarityService similarityService,
     ElasticSearchService elasticService)
 {
     this.bundleRepo        = bundleRepo;
     this.dumpRepo          = dumpRepo;
     this.similarityService = similarityService;
     this.elasticService    = elasticService;
 }
コード例 #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;
 }
コード例 #11
0
ファイル: AnalysisService.cs プロジェクト: zhangz/superdump
 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);
 }
コード例 #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();
 }
コード例 #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())));
            }
        }
コード例 #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();
            }
        }
コード例 #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);
 }
コード例 #16
0
 public BundleRepository(IBundleStorage storage, DumpRepository dumpRepository)
 {
     this.storage        = storage;
     this.dumpRepository = dumpRepository;
 }
コード例 #17
0
ファイル: SimilarityService.cs プロジェクト: tanium/superdump
 public SimilarityService(DumpRepository dumpRepo, RelationshipRepository relationShipRepository)
 {
     this.dumpRepo         = dumpRepo;
     this.relationShipRepo = relationShipRepository;
 }
コード例 #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));
        }
コード例 #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));
 }
コード例 #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));
 }
コード例 #21
0
 public RelationshipRepository(RelationshipStorageFilebased relationshipStorage, DumpRepository dumpRepo)
 {
     this.relationshipStorage = relationshipStorage;
     this.dumpRepo            = dumpRepo;
 }
コード例 #22
0
 public FaultReportingService(IFaultReportSender faultReportSender, DumpRepository dumpRepository, BundleRepository bundleRepository)
 {
     this.faultReportSender = faultReportSender;
     this.dumpRepository    = dumpRepository;
     this.bundleRepository  = bundleRepository;
 }