use of co.elastic.apm.impl.payload.ServiceFactory in project apm-agent-java by elastic.
the class ReporterFactory method createReporter.
public Reporter createReporter(ConfigurationRegistry configurationRegistry, @Nullable String frameworkName, @Nullable String frameworkVersion) {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new AfterburnerModule());
final ReporterConfiguration reporterConfiguration = configurationRegistry.getConfig(ReporterConfiguration.class);
return new ApmServerReporter(configurationRegistry, new ServiceFactory().createService(configurationRegistry.getConfig(CoreConfiguration.class), frameworkName, frameworkVersion), ProcessFactory.ForCurrentVM.INSTANCE.getProcessInformation(), SystemInfo.create(), new ApmServerHttpPayloadSender(getOkHttpClient(reporterConfiguration), new JacksonPayloadSerializer(objectMapper), reporterConfiguration), true, reporterConfiguration);
}
Aggregations