Open jaredcnance opened 4 years ago
@jaredcnance is there any likelihood that this feature will be released in the near future?
@davidtheclark the current priority for this repo is #54 and then this issue. The earliest I could probably complete this issue would be ~5-6 weeks from now.
Any updates on this?
Description
Currently, if the agent is down or has not started, metrics can be dropped. It's currently up to the caller of
logger.flush
to handle retries. There are 2 options:logger.flush
. This could negatively impact request latencies.The symptoms of this are:
Tasks
AgentSinkOptions
withRetryStrategy
parameter where the default value isNone
for backwards compatibility with a single option to start with:ExponentialBackoffRetryStrategy
(see also: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/)AsyncBehavior
parameter that controls whether the call should block or not. In the former case we keep the current behavior and in the latter we return immediately, enqueuing to the retry buffer on failure.constructor(options: AgentSinkOptions, ISerializer: serializer)
.NoRetry
propagates errors back to the caller offlush
which maintains current behavior today.ExponentialRetry
(which can be configured by the application) will blockflush
on the first attempt, enqueuing to aCircularBuffer
(whose size is also configurable) on failures.setInterval
will be set to check the size of theCircularBuffer
and retry failed requests asynchronously.shutdown
method to gracefully shutdown and block on any outstanding requests.Example Usage
Open Question
logger.flush()
to enqueue and return immediately? This would allow us to makeflush()
a synchronous operation in all cases.