use of com.newrelic.agent.normalization.NormalizationServiceImpl in project newrelic-java-agent by newrelic.
the class RequestUriConfigTests method createServiceManager.
private void createServiceManager(Map<String, Object> configMap) throws Exception {
ConfigService configService = ConfigServiceFactory.createConfigServiceUsingSettings(configMap);
MockServiceManager serviceManager = new MockServiceManager(configService);
ServiceFactory.setServiceManager(serviceManager);
serviceManager.setHarvestService(new MockHarvestService());
serviceManager.setSqlTraceService(new SqlTraceServiceImpl());
serviceManager.setAttributesService(new AttributesService());
serviceManager.setNormalizationService(new NormalizationServiceImpl());
MockRPMServiceManager rpmServiceManager = new MockRPMServiceManager();
serviceManager.setRPMServiceManager(rpmServiceManager);
MockRPMService rpmService = new MockRPMService();
rpmService.setApplicationName(serviceManager.getConfigService().getDefaultAgentConfig().getApplicationName());
rpmService.setEverConnected(true);
rpmService.setIsConnected(true);
rpmService.setErrorService(new ErrorServiceImpl(serviceManager.getConfigService().getDefaultAgentConfig().getApplicationName()));
rpmServiceManager.setRPMService(rpmService);
serviceManager.start();
}
use of com.newrelic.agent.normalization.NormalizationServiceImpl in project newrelic-java-agent by newrelic.
the class RumStreamParserTest method createServiceManager.
private static void createServiceManager(Map<String, Object> map) throws Exception {
MockServiceManager serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
serviceManager.start();
ThreadService threadService = new ThreadService();
serviceManager.setThreadService(threadService);
ConfigService configService = ConfigServiceFactory.createConfigService(AgentConfigImpl.createAgentConfig(map), map);
serviceManager.setConfigService(configService);
MockCoreService agent = new MockCoreService();
serviceManager.setCoreService(agent);
HarvestService harvestService = new MockHarvestService();
serviceManager.setHarvestService(harvestService);
TransactionService transactionService = new TransactionService();
serviceManager.setTransactionService(transactionService);
TransactionTraceService transactionTraceService = new TransactionTraceService();
serviceManager.setTransactionTraceService(transactionTraceService);
SqlTraceService sqlTraceService = new SqlTraceServiceImpl();
serviceManager.setSqlTraceService(sqlTraceService);
MockRPMServiceManager rpmServiceManager = new MockRPMServiceManager();
serviceManager.setRPMServiceManager(rpmServiceManager);
MockRPMService rpmService = new MockRPMService();
rpmService.setApplicationName(APP_NAME);
rpmService.setErrorService(new ErrorServiceImpl(APP_NAME));
rpmServiceManager.setRPMService(rpmService);
configService.start();
serviceManager.setNormalizationService(new NormalizationServiceImpl());
StatsService statsService = new StatsServiceImpl();
serviceManager.setStatsService(statsService);
statsService.start();
}
use of com.newrelic.agent.normalization.NormalizationServiceImpl in project newrelic-java-agent by newrelic.
the class NormalizedTransactionTrace method createServiceManager.
private static void createServiceManager(Map<String, Object> map) throws Exception {
MockServiceManager serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
serviceManager.start();
ConfigService configService = ConfigServiceFactory.createConfigService(AgentConfigImpl.createAgentConfig(map), map);
serviceManager.setConfigService(configService);
MockCoreService agent = new MockCoreService();
serviceManager.setCoreService(agent);
TransactionService transactionService = new TransactionService();
serviceManager.setTransactionService(transactionService);
TransactionTraceService transactionTraceService = new TransactionTraceService();
serviceManager.setTransactionTraceService(transactionTraceService);
AttributesService attrService = new AttributesService();
serviceManager.setAttributesService(attrService);
MockRPMServiceManager rpmServiceManager = new MockRPMServiceManager();
serviceManager.setRPMServiceManager(rpmServiceManager);
MockRPMService rpmService = new MockRPMService();
rpmService.setApplicationName("Unit Test");
rpmServiceManager.setRPMService(rpmService);
NormalizationService normalizationService = new NormalizationServiceImpl();
serviceManager.setNormalizationService(normalizationService);
}
use of com.newrelic.agent.normalization.NormalizationServiceImpl in project newrelic-java-agent by newrelic.
the class IntrospectorServiceManager method setup.
private void setup(Map<String, Object> config) {
configService = ConfigServiceFactory.createConfigService(AgentConfigImpl.createAgentConfig(config), Collections.<String, Object>emptyMap());
ServiceFactory.setServiceManager(this);
coreService = new IntrospectorCoreService();
threadService = new ThreadService();
environmentService = new EnvironmentServiceImpl();
transactionService = new TransactionService();
rpmConnectionService = new IntrospectorRPMConnectService();
rpmServiceManager = new IntrospectorRPMServiceManager();
transactionTraceService = new IntrospectorTransactionTraceService();
asyncTxService = new AsyncTransactionService();
profilerService = new ProfilerService();
statsService = new IntrospectorStatsService();
harvestService = new IntrospectorHarvestService();
sqlTraceService = new SqlTraceServiceImpl();
insightsService = new IntrospectorInsightsService();
logSenderService = new IntrospectorLogSenderService();
expirationService = new ExpirationService();
dbService = new DatabaseService();
jarCollectorService = new IgnoringJarCollectorService();
distributedTraceService = new DistributedTraceServiceImpl();
TransactionDataToDistributedTraceIntrinsics transactionDataToDistributedTraceIntrinsics = new TransactionDataToDistributedTraceIntrinsics(distributedTraceService);
transactionEventsService = new TransactionEventsService(transactionDataToDistributedTraceIntrinsics);
normalizationService = new NormalizationServiceImpl();
extensionService = new ExtensionService(configService, ExtensionsLoadedListener.NOOP);
tracerService = new TracerService();
commandParser = new CommandParser();
remoteInstrumentationService = new RemoteInstrumentationServiceImpl();
sourceLanguageService = new SourceLanguageService();
classTransformerService = new NoOpClassTransformerService();
jmxService = new JmxService(configService.getDefaultAgentConfig().getJmxConfig());
attributesService = new AttributesService();
circuitBreakerService = new CircuitBreakerService();
AgentConfig agentConfig = createAgentConfig(config, (Map) config.get("distributed_tracing"));
distributedTraceService.connected(null, agentConfig);
ReservoirManager<SpanEvent> reservoirManager = new CollectorSpanEventReservoirManager(configService);
ReservoirManager.EventSender<SpanEvent> collectorSender = new CollectorSpanEventSender(rpmServiceManager);
Consumer<SpanEvent> infiniteTracing = new Consumer<SpanEvent>() {
@Override
public void accept(SpanEvent spanEvent) {
}
};
SpanEventCreationDecider spanEventCreationDecider = new SpanEventCreationDecider(configService);
spanEventsService = new IntrospectorSpanEventService(agentConfig, reservoirManager, collectorSender, infiniteTracing, spanEventCreationDecider, environmentService, transactionDataToDistributedTraceIntrinsics);
configService.addIAgentConfigListener((IntrospectorSpanEventService) spanEventsService);
transactionService.addTransactionListener((IntrospectorSpanEventService) spanEventsService);
try {
transactionTraceService.start();
transactionEventsService.start();
transactionService.start();
} catch (Exception e) {
// fall through
}
}
use of com.newrelic.agent.normalization.NormalizationServiceImpl in project newrelic-java-agent by newrelic.
the class SpringPointCutTest method beforeClass.
@BeforeClass
public static void beforeClass() throws Exception {
MockServiceManager serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
serviceManager.start();
ThreadService threadService = new ThreadService();
serviceManager.setThreadService(threadService);
Map<String, Object> settings = AgentConfigFactoryTest.createStagingMap();
AgentConfig config = AgentConfigFactory.createAgentConfig(settings, null, null);
MockConfigService configService = new MockConfigService(null);
configService.setAgentConfig(config);
serviceManager.setConfigService(configService);
MockRPMServiceManager rpmServiceManager = new MockRPMServiceManager();
serviceManager.setRPMServiceManager(rpmServiceManager);
MockRPMService rpmService = new MockRPMService();
rpmService.setApplicationName("Unit Test");
rpmServiceManager.setRPMService(rpmService);
serviceManager.setNormalizationService(new NormalizationServiceImpl());
}
Aggregations