-
Notifications
You must be signed in to change notification settings - Fork 79
update PushTraceSpans to return dropped spans instead of good spans. #251
Conversation
@ibawt PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Codecov Report
@@ Coverage Diff @@
## master #251 +/- ##
==========================================
- Coverage 72.24% 72.11% -0.14%
==========================================
Files 14 14
Lines 1643 1646 +3
==========================================
Hits 1187 1187
- Misses 380 383 +3
Partials 76 76
Continue to review full report at Codecov.
|
trace.go
Outdated
@@ -148,7 +148,8 @@ func (e *traceExporter) pushTraceSpans(ctx context.Context, node *commonpb.Node, | |||
ctx, cancel := newContextWithTimeout(ctx, e.o.Timeout) | |||
defer cancel() | |||
|
|||
return e.client.BatchWriteSpans(ctx, &req) | |||
err := e.client.BatchWriteSpans(ctx, &req) | |||
return 0, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will never be any dropped spans for stackdriver, is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if err
is not nil
, we should return len(protoSpans)
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dinooliva it will be all or none.
@songy23 fixed it.
fixes #250