Package com.newrelic.telemetry.transport
Class BatchDataSender
- java.lang.Object
-
- com.newrelic.telemetry.transport.BatchDataSender
-
public class BatchDataSender extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description BatchDataSender(HttpPoster client, java.lang.String apiKey, java.net.URL endpointURl, boolean auditLoggingEnabled, java.lang.String secondaryUserAgent)
BatchDataSender(HttpPoster client, java.lang.String apiKey, java.net.URL endpointURl, boolean auditLoggingEnabled, java.lang.String secondaryUserAgent, boolean useLicenseKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Response
send(java.lang.String json, TelemetryBatch<? extends Telemetry> batch)
Sends a compressed byte[] of telemetry to New Relic
-
-
-
Constructor Detail
-
BatchDataSender
public BatchDataSender(HttpPoster client, java.lang.String apiKey, java.net.URL endpointURl, boolean auditLoggingEnabled, java.lang.String secondaryUserAgent)
-
BatchDataSender
public BatchDataSender(HttpPoster client, java.lang.String apiKey, java.net.URL endpointURl, boolean auditLoggingEnabled, java.lang.String secondaryUserAgent, boolean useLicenseKey)
-
-
Method Detail
-
send
public Response send(java.lang.String json, TelemetryBatch<? extends Telemetry> batch) throws DiscardBatchException, RetryWithSplitException, RetryWithBackoffException, RetryWithRequestedWaitException
Sends a compressed byte[] of telemetry to New Relic- Parameters:
json
- The json to send.batch
- The batch of telemetry the json was generated from- Returns:
- The response from the ingest API.
- Throws:
RetryWithBackoffException
- Is the default case if the Ingest API responds with an error.DiscardBatchException
- In cases where the Ingest API responds with a 411.RetryWithSplitException
- In cases where the Ingest API responds with a 413.RetryWithRequestedWaitException
- In cases where the Ingest API responds with a 429.
-
-