Skip to content

Commit

Permalink
Fix sfx submissions reporting a timeout when one encounters an error (#…
Browse files Browse the repository at this point in the history
…684)

* Only send one result if an sfx flush error occurs

The submitDatapoints function would send the error across the channel
and then immediately send nil also, which would cut a Flush function's
waiting period short. Oops.

* Thank me
  • Loading branch information
asf-stripe authored Jan 24, 2019
1 parent b910d28 commit e99c97e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 12.0.0, in progress

## Bugfixes
* The signalfx client no longer reports a timeout when submission to the datapoint API endpoint encounters an error. Thanks, [antifuchs](https://github.com/antifuchs)!

# 11.0.0, 2019-01-22

Expand Down
3 changes: 1 addition & 2 deletions sinks/signalfx/signalfx.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ func submitDatapoints(ctx context.Context, cl *trace.Client, client dpsink.Sink,
if err != nil {
span.Error(err)
span.Add(ssf.Count("flush.error_total", 1, map[string]string{"cause": "io", "sink": "signalfx"}))
errs <- err
}
errs <- nil
errs <- err
}

func (c *collection) submit(ctx context.Context, cl *trace.Client, maxPerFlush int) error {
Expand Down

0 comments on commit e99c97e

Please sign in to comment.