Search in sources :

Example 1 with ServiceFactory

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);
}
Also used : AfterburnerModule(com.fasterxml.jackson.module.afterburner.AfterburnerModule) ServiceFactory(co.elastic.apm.impl.payload.ServiceFactory) JacksonPayloadSerializer(co.elastic.apm.report.serialize.JacksonPayloadSerializer) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Aggregations

ServiceFactory (co.elastic.apm.impl.payload.ServiceFactory)1 JacksonPayloadSerializer (co.elastic.apm.report.serialize.JacksonPayloadSerializer)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 AfterburnerModule (com.fasterxml.jackson.module.afterburner.AfterburnerModule)1