public class HTTPMetricEventPublisher extends MetricEventPublisher
MetricEvent to a provided URL. It can retry publishes.DEFAULT_GROUPconfig| Constructor and Description |
|---|
HTTPMetricEventPublisher(BulletConfig config)
Constructor taking a
BulletConfig. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected org.apache.http.impl.client.CloseableHttpClient |
createClient()
Creates a
CloseableHttpClient client to use for HTTP requests. |
Map<String,String> |
getDimensions(Map<String,String> extraDimensions)
Returns any static dimensions to use.
|
String |
getGroup()
Get the group to use for the
MetricEvent. |
CompletableFuture<Boolean> |
publish(MetricEvent payload)
Publish a payload of the concrete type of this class.
|
convertpublic HTTPMetricEventPublisher(BulletConfig config)
BulletConfig.config - The config to use containing the necessary information.protected org.apache.http.impl.client.CloseableHttpClient createClient()
CloseableHttpClient client to use for HTTP requests.public void close()
public String getGroup()
MetricEventPublisherMetricEvent. By default, uses MetricEventPublisher.DEFAULT_GROUP.getGroup in class MetricEventPublisherMetricEvent.public Map<String,String> getDimensions(Map<String,String> extraDimensions)
MetricPublishergetDimensions in class MetricPublisher<MetricEvent>extraDimensions - Any non-null extra dimensions Map to add.Map of static and extra dimensions to use for all publishing.public CompletableFuture<Boolean> publish(MetricEvent payload)
MetricPublisherpublish in class MetricPublisher<MetricEvent>payload - The payload to publish.CompletableFuture that resolves to true or false depending on whether the publish succeeded.Copyright © 2021. All rights reserved.