Package com.newrelic.telemetry
Interface SpanBatchSenderFactory
-
public interface SpanBatchSenderFactory
A factory interface for creating a SpanBatchSender.Concrete implementations use different HTTP providers.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default SenderConfiguration.SenderConfigurationBuilder
configureWith(java.lang.String apiKey)
Create a new SpanBatchSenderBuilder with your New Relic Insights Insert API key.default SpanBatchSender
createBatchSender(java.lang.String apiKey)
Create a new SpanBatchSender with your New Relic Insights Insert API key, and otherwise default settings.static SpanBatchSenderFactory
fromHttpImplementation(java.util.function.Supplier<HttpPoster> creator)
Create anSpanBatchSenderFactory
with an HTTP implementation.HttpPoster
getPoster()
-
-
-
Method Detail
-
createBatchSender
default SpanBatchSender createBatchSender(java.lang.String apiKey)
Create a new SpanBatchSender with your New Relic Insights Insert API key, and otherwise default settings. (2 second timeout, audit logging off, with the default endpoint URL)- See Also:
- New Relic API Keys
-
configureWith
default SenderConfiguration.SenderConfigurationBuilder configureWith(java.lang.String apiKey)
Create a new SpanBatchSenderBuilder with your New Relic Insights Insert API key.- See Also:
- New Relic API Keys
-
getPoster
HttpPoster getPoster()
-
fromHttpImplementation
static SpanBatchSenderFactory fromHttpImplementation(java.util.function.Supplier<HttpPoster> creator)
Create anSpanBatchSenderFactory
with an HTTP implementation.- Parameters:
creator
- ASupplier
that returns anHttpPoster
implementation.- Returns:
- A Factory configured for use.
-
-