public void SetUp() { _compositeTestAgent = new CompositeTestAgent(); _agent = _compositeTestAgent.GetAgent(); _apiSupportabilityMetricCounters = _compositeTestAgent.Container.Resolve <IApiSupportabilityMetricCounters>(); _configSvc = _compositeTestAgent.Container.Resolve <IConfigurationService>(); }
public void SetUp() { _compositeTestAgent = new CompositeTestAgent(); _compositeTestAgent.LocalConfiguration.distributedTracing.enabled = _isDistributedTracingEnabled; _agent = _compositeTestAgent.GetAgent(); }
public void SetUp() { _compositeTestAgent = new CompositeTestAgent(); _compositeTestAgent.ServerConfiguration.AccountId = _accountId; _compositeTestAgent.ServerConfiguration.TrustedAccountKey = _trustKey; _compositeTestAgent.ServerConfiguration.PrimaryApplicationId = _appId; _apiSupportabilityMetricCounters = _compositeTestAgent.Container.Resolve <IApiSupportabilityMetricCounters>(); _configSvc = _compositeTestAgent.Container.Resolve <IConfigurationService>(); }
public void BeforeEachTest() { _compositeTestAgent = new CompositeTestAgent(); _adaptiveSampler = new AdaptiveSampler(AdaptiveSampler.DefaultTargetSamplesPerInterval, DefaultSamplingTargetIntervalInSecondsForTesting, DefaultSeedForTesting); //This will simulate that the agent has connected and force a sampling interval to start _compositeTestAgent.ServerConfiguration.SamplingTarget = AdaptiveSampler.DefaultTargetSamplesPerInterval; _compositeTestAgent.ServerConfiguration.SamplingTargetPeriodInSeconds = DefaultSamplingTargetIntervalInSecondsForTesting; _compositeTestAgent.PushConfiguration(); }
public void SetUp() { _compositeTestAgent = new CompositeTestAgent(); _compositeTestAgent.ServerConfiguration.Instrumentation = new List <ServerConfiguration.InstrumentationConfig> { new ServerConfiguration.InstrumentationConfig { Name = "live_instrumentation", Config = "SomeXml" } }; }
public void SetUp() { _compositeTestAgent = new CompositeTestAgent(); var environment = _compositeTestAgent.Container.Resolve <IEnvironment>(); var collectorWireFactory = Mock.Create <ICollectorWireFactory>(); _collectorWire = Mock.Create <ICollectorWire>(); var systemInfo = Mock.Create <ISystemInfo>(); var processStatic = Mock.Create <IProcessStatic>(); var agentEnvironment = new NewRelic.Agent.Core.Environment(systemInfo, processStatic); Mock.Arrange(() => collectorWireFactory.GetCollectorWire(null, Arg.IsAny <IAgentHealthReporter>())).IgnoreArguments().Returns(_collectorWire); Mock.Arrange(() => _collectorWire.SendData("preconnect", Arg.IsAny <ConnectionInfo>(), Arg.IsAny <string>())) .Returns("{'return_value': { 'redirect_host': ''}}"); _agentHealthReporter = Mock.Create <IAgentHealthReporter>(); _connectionHandler = new ConnectionHandler(new JsonSerializer(), collectorWireFactory, Mock.Create <IProcessStatic>(), Mock.Create <IDnsStatic>(), Mock.Create <ILabelsService>(), agentEnvironment, systemInfo, _agentHealthReporter, Mock.Create <IEnvironment>()); }
public void SetUp() { _compositeTestAgent = new CompositeTestAgent(); _compositeTestAgent.LocalConfiguration.distributedTracing.enabled = false; _compositeTestAgent.LocalConfiguration.crossApplicationTracingEnabled = true; _compositeTestAgent.ServerConfiguration.AccountId = _accountId.ToString(); _compositeTestAgent.ServerConfiguration.TrustedAccountKey = _trustKey; _compositeTestAgent.ServerConfiguration.PrimaryApplicationId = _appId.ToString(); _catMetricCounters = _compositeTestAgent.Container.Resolve <ICATSupportabilityMetricCounters>(); var crossProcessID = $"{_accountId}#{_appId}"; _crossProcessIDEncoded = Strings.Base64Encode(crossProcessID, _agent.Configuration.EncodingKey); var reqData = new CrossApplicationRequestData("referrerTransactionGuid", false, "referrerTripId", "referrerPathHash"); _reqDataEncoded = HeaderEncoder.SerializeAndEncode(reqData, _agent.Configuration.EncodingKey); _compositeTestAgent.ServerConfiguration.TrustedIds = new long[] { _accountId }; _compositeTestAgent.PushConfiguration(); }
public void SetUp() { _compositeTestAgent = new CompositeTestAgent(); _agent = _compositeTestAgent.GetAgent(); }
public void SetUp() { _compositeTestAgent = new CompositeTestAgent(); _attribValues = new AttributeValueCollection(AttributeDestinations.TransactionEvent); }