Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(flusher): Retry flush on exit #21

Merged
merged 4 commits into from
Oct 10, 2023
Merged

fix(flusher): Retry flush on exit #21

merged 4 commits into from
Oct 10, 2023

Conversation

bahlo
Copy link
Member

@bahlo bahlo commented Oct 5, 2023

The flusher keeps a batch of events so retrying doesn't make sense when we'll flush again with the next event.

But on exit there won't be a next event, so we need to retry there.

Because you can't set the retry behaviour after constructing an Axiom client, this creates a second one that retries and adds a RetryOpt to the Flush method.

@bahlo bahlo requested review from a-khaledf and dasfmi October 5, 2023 13:13
@bahlo bahlo changed the title fix(flusher): Retry if we flush on exit fix(flusher): Retry flush on exit Oct 5, 2023
The flusher keeps a batch of events so retrying doesn't make sense when
we'll flush again with the next event.

But on exit there won't be a next event, so we need to retry there.

Because you can't set the retry behaviour after constructing an Axiom
client, this creates a second one that retries and adds a `RetryOpt` to
the `Flush` method.
@bahlo bahlo force-pushed the arne/fix-flush-on-exit branch from 0167347 to 48e92ea Compare October 5, 2023 13:14
@dasfmi dasfmi merged commit 1ff8f14 into main Oct 10, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants