Package co.elastic.apm.agent.report
Class ApmServerReporter
- java.lang.Object
-
- co.elastic.apm.agent.report.ApmServerReporter
-
- All Implemented Interfaces:
Reporter,java.io.Closeable,java.lang.AutoCloseable
public class ApmServerReporter extends java.lang.Object implements Reporter
This reporter asynchronously reportsTransactions to the APM serverIt uses a Disruptor/ring buffer to decouple the
Transactionproducing threads from the thread that actually sends the payload
-
-
Constructor Summary
Constructors Constructor Description ApmServerReporter(boolean dropTransactionIfQueueFull, ReporterConfiguration reporterConfiguration, ReportingEventHandler reportingEventHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.util.concurrent.Future<java.lang.Void>flush()Flushes pendingErrorCaptures andTransactions to the APM server.longgetDropped()longgetReported()voidreport(ErrorCapture error)voidreport(Span span)voidreport(Transaction transaction)voidreport(com.dslplatform.json.JsonWriter jsonWriter)voidstart()
-
-
-
Constructor Detail
-
ApmServerReporter
public ApmServerReporter(boolean dropTransactionIfQueueFull, ReporterConfiguration reporterConfiguration, ReportingEventHandler reportingEventHandler)
-
-
Method Detail
-
report
public void report(Transaction transaction)
-
getDropped
public long getDropped()
- Specified by:
getDroppedin interfaceReporter
-
getReported
public long getReported()
- Specified by:
getReportedin interfaceReporter
-
flush
public java.util.concurrent.Future<java.lang.Void> flush()
Flushes pendingErrorCaptures andTransactions to the APM server.This method may block for a while until a slot in the ring buffer becomes available.
-
close
public void close()
-
report
public void report(ErrorCapture error)
-
-