Package com.newrelic.telemetry
Interface SpanBatchSenderFactory
-
public interface SpanBatchSenderFactoryA 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.SenderConfigurationBuilderconfigureWith(BaseConfig baseConfig)Creates a new SenderConfigurationBuilder to help with constructing a SpanBatchSender.default SenderConfiguration.SenderConfigurationBuilderconfigureWith(java.lang.String apiKey)Create a new SpanBatchSenderBuilder with your New Relic Insights Insert API key.default SpanBatchSendercreateBatchSender(java.lang.String apiKey)Create a new SpanBatchSender with your New Relic Insights Insert API key, and otherwise default settings.static SpanBatchSenderFactoryfromHttpImplementation(java.util.function.Supplier<HttpPoster> creator)Create anSpanBatchSenderFactorywith an HTTP implementation.HttpPostergetPoster()
-
-
-
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)- Parameters:
apiKey- new relic api key- Returns:
- a new instance of a span batch sender
- See Also:
- New Relic API Keys
-
configureWith
default SenderConfiguration.SenderConfigurationBuilder configureWith(BaseConfig baseConfig)
Creates a new SenderConfigurationBuilder to help with constructing a SpanBatchSender. This builder is configured with data from the BaseConfig, including the apiKey, audit logging dis/enabled, and secondary user agent (which may be null).- Parameters:
baseConfig- a BaseConfig with settings to apply to the new builder- Returns:
- a new SenderConfigurationBuilder with the config applied
-
configureWith
default SenderConfiguration.SenderConfigurationBuilder configureWith(java.lang.String apiKey)
Create a new SpanBatchSenderBuilder with your New Relic Insights Insert API key.- Parameters:
apiKey- new relic api key- Returns:
- a new instance of a span configuration builder
- See Also:
- New Relic API Keys
-
getPoster
HttpPoster getPoster()
-
fromHttpImplementation
static SpanBatchSenderFactory fromHttpImplementation(java.util.function.Supplier<HttpPoster> creator)
Create anSpanBatchSenderFactorywith an HTTP implementation.- Parameters:
creator- ASupplierthat returns anHttpPosterimplementation.- Returns:
- A Factory configured for use.
-
-