| Constructor and Description |
|---|
AgentSink(java.lang.String logGroupName,
java.lang.String logStreamName,
Endpoint endpoint,
SocketClientFactory clientFactory,
int asyncQueueDepth,
java.util.function.Supplier<RetryStrategy> retryStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(MetricsContext context)
Accept MetricsContext to sink to CloudWatch.
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
shutdown()
Shutdown the sink.
|
public AgentSink(java.lang.String logGroupName,
java.lang.String logStreamName,
Endpoint endpoint,
SocketClientFactory clientFactory,
int asyncQueueDepth,
java.util.function.Supplier<RetryStrategy> retryStrategy)
public void accept(MetricsContext context)
ISinkpublic java.util.concurrent.CompletableFuture<java.lang.Void> shutdown()
ISinkCompletableFuture will be completed when all queued
events have been flushed. After this is called, no more metrics can be sent through this sink
and attempting to continue to re-use the sink will result in undefined behavior.