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

Exported Flush() function of the client #40

Merged
merged 1 commit into from
Nov 14, 2017

Conversation

colega
Copy link
Contributor

@colega colega commented Sep 12, 2017

We're using datadog to have metrics of panics, but sometimes nobody recovers those panics and as we're using a buffered client, we lose those events/metrics.

This is slightly different from #18 as we don't want to close the client, maybe someone on the stack knows how to recover that panic, but we do want to make sure our event was sent, so the usage for this would be like:

if err := recover(); err != nil {
   client.Event(...)
   client.Flush()
   panic(err)
}

@masci masci added this to the 1.2.0 milestone Oct 20, 2017
Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Ackar
Copy link

Ackar commented Nov 14, 2017

I'm also interested in this. Is it possible to merge it?
Thanks!

@masci masci merged commit 90d8c57 into DataDog:master Nov 14, 2017
@colega colega deleted the cabify/export-client-flush branch November 14, 2017 19:14
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.

3 participants