public void SetUp() { _configuration = Mock.Create <IConfiguration>(); Mock.Arrange(() => _configuration.CrossApplicationTracingEnabled).Returns(true); _configurationService = Mock.Create <IConfigurationService>(); Mock.Arrange(() => _configurationService.Configuration).Returns(() => _configuration); var catSupportabilityCounters = Mock.Create <ICATSupportabilityMetricCounters>(); _pathHashMaker = new PathHashMaker(_configurationService); _catHeaderHandler = new CatHeaderHandler(_configurationService, catSupportabilityCounters); _syntheticsHeaderHandler = new SyntheticsHeaderHandler(_configurationService); var metricNameService = Mock.Create <IMetricNameService>(); Mock.Arrange(() => metricNameService.RenameTransaction(Arg.IsAny <TransactionMetricName>())) .Returns(name => name); _transactionMetricNameMaker = new TransactionMetricNameMaker(metricNameService); var transactionBuilderService = Mock.Create <ITransactionService>(); Mock.Arrange(() => transactionBuilderService.GetCurrentInternalTransaction()).Returns(() => _transaction); var agentHealthReporter = Mock.Create <IAgentHealthReporter>(); _agent = new Agent(transactionBuilderService, Mock.Create <ITransactionTransformer>(), Mock.Create <IThreadPoolStatic>(), _transactionMetricNameMaker, _pathHashMaker, _catHeaderHandler, Mock.Create <IDistributedTracePayloadHandler>(), _syntheticsHeaderHandler, Mock.Create <ITransactionFinalizer>(), Mock.Create <IBrowserMonitoringPrereqChecker>(), Mock.Create <IBrowserMonitoringScriptMaker>(), _configurationService, agentHealthReporter, Mock.Create <IAgentTimerService>(), Mock.Create <IMetricNameService>(), new TraceMetadataFactory(new AdaptiveSampler()), catSupportabilityCounters); _attribDefSvc = new AttributeDefinitionService((f) => new AttributeDefinitions(f)); _transactionAttributeMaker = new TransactionAttributeMaker(_configurationService, _attribDefSvc); }
public Agent(ITransactionService transactionService, ITransactionTransformer transactionTransformer, IThreadPoolStatic threadPoolStatic, ITransactionMetricNameMaker transactionMetricNameMaker, IPathHashMaker pathHashMaker, ICatHeaderHandler catHeaderHandler, IDistributedTracePayloadHandler distributedTracePayloadHandler, ISyntheticsHeaderHandler syntheticsHeaderHandler, ITransactionFinalizer transactionFinalizer, IBrowserMonitoringPrereqChecker browserMonitoringPrereqChecker, IBrowserMonitoringScriptMaker browserMonitoringScriptMaker, IConfigurationService configurationService, IAgentHealthReporter agentHealthReporter, IAgentTimerService agentTimerService, IMetricNameService metricNameService, Api.ITraceMetadataFactory traceMetadataFactory, ICATSupportabilityMetricCounters catMetricCounters) { _transactionService = transactionService; _transactionTransformer = transactionTransformer; _threadPoolStatic = threadPoolStatic; _transactionMetricNameMaker = transactionMetricNameMaker; _pathHashMaker = pathHashMaker; _catHeaderHandler = catHeaderHandler; _distributedTracePayloadHandler = distributedTracePayloadHandler; _syntheticsHeaderHandler = syntheticsHeaderHandler; _transactionFinalizer = transactionFinalizer; _browserMonitoringPrereqChecker = browserMonitoringPrereqChecker; _browserMonitoringScriptMaker = browserMonitoringScriptMaker; _configurationService = configurationService; _agentHealthReporter = agentHealthReporter; _agentTimerService = agentTimerService; _metricNameService = metricNameService; _traceMetadataFactory = traceMetadataFactory; _catMetricCounters = catMetricCounters; Instance = this; }
public TransactionFinalizer(IAgentHealthReporter agentHealthReporter, ITransactionMetricNameMaker transactionMetricNameMaker, IPathHashMaker pathHashMaker, ITransactionTransformer transactionTransformer) { _agentHealthReporter = agentHealthReporter; _transactionMetricNameMaker = transactionMetricNameMaker; _pathHashMaker = pathHashMaker; _transactionTransformer = transactionTransformer; _subscriptions.Add <TransactionFinalizedEvent>(OnTransactionFinalized); }
public void SetUp() { _agentHealthReporter = Mock.Create <IAgentHealthReporter>(); _transactionMetricNameMaker = Mock.Create <ITransactionMetricNameMaker>(); _pathHashMaker = Mock.Create <IPathHashMaker>(); _transactionTransformer = Mock.Create <ITransactionTransformer>(); _attribDefSvc = new AttributeDefinitionService((f) => new AttributeDefinitions(f)); _transactionFinalizer = new TransactionFinalizer(_agentHealthReporter, _transactionMetricNameMaker, _pathHashMaker, _transactionTransformer); }
public void SetUp() { _configuration = Mock.Create <IConfiguration>(); Mock.Arrange(() => _configuration.CrossApplicationTracingEnabled).Returns(true); var configurationService = Mock.Create <IConfigurationService>(); Mock.Arrange(() => configurationService.Configuration).Returns(() => _configuration); _pathHashMaker = new PathHashMaker(configurationService); }