Package com.newrelic.telemetry.spans
Class SpanBatchSender
- java.lang.Object
-
- com.newrelic.telemetry.spans.SpanBatchSender
-
public class SpanBatchSender extends java.lang.Object
Manages the sending ofSpanBatch
instances to the New Relic Spans API.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SpanBatchSenderBuilder
builder()
Deprecated.Use thecreate(SenderConfiguration)
method instead.static SenderConfiguration.SenderConfigurationBuilder
configurationBuilder()
static SpanBatchSender
create(SenderConfiguration configuration)
Build the finalSpanBatchSender
.Response
sendBatch(SpanBatch batch)
Send a batch of spans to New Relic.
-
-
-
Method Detail
-
builder
@Deprecated public static SpanBatchSenderBuilder builder()
Deprecated.Use thecreate(SenderConfiguration)
method instead.Creates a builder forSpanBatchSender
-
sendBatch
public Response sendBatch(SpanBatch batch) throws ResponseException
Send a batch of spans to New Relic.- Parameters:
batch
- The batch to send. This batch will be drained of accumulated spans as a part of this process.- Returns:
- The response from the ingest API.
- Throws:
ResponseException
- In cases where the batch is unable to be successfully sent, one of the subclasses ofResponseException
will be thrown. See the documentation on that hierarchy for details on the recommended ways to respond to those exceptions.
-
create
public static SpanBatchSender create(SenderConfiguration configuration)
Build the finalSpanBatchSender
.- Returns:
- the fully configured SpanBatchSender object
-
configurationBuilder
public static SenderConfiguration.SenderConfigurationBuilder configurationBuilder()
-
-