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

SpanProcessor incorrect calls to SpanExporter::forceFlush() #715

Closed
Nevay opened this issue Jun 16, 2022 · 4 comments
Closed

SpanProcessor incorrect calls to SpanExporter::forceFlush() #715

Nevay opened this issue Jun 16, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Nevay
Copy link
Contributor

Nevay commented Jun 16, 2022

  • SimpleSpanProcessor::forceFlush() has to force-flush exporter
  • BatchSpanProcessor::onEnd() shouldn't force-flush exporter
@Nevay Nevay added the bug Something isn't working label Jun 16, 2022
@brettmc
Copy link
Collaborator

brettmc commented Jun 16, 2022

I agree with SimpleSpanProcessor::forceFlush(), but the conditional flush in BatchSpanProcessor::onEnd() seems critical to the batching functionality. Is the issue that we're using the forceFlush() mechanism not for its intended purpose?

@Nevay
Copy link
Contributor Author

Nevay commented Jun 16, 2022

The batching functionality doesn't depend on force-flushing; the batch processor should still call ::export() with the batch in ::onEnd(), just without calling ::forceFlush() afterwards.

SpanExporter::forceFlush()

ForceFlush SHOULD only be called in cases where it is absolutely necessary, such as when using some FaaS providers that may suspend the process after an invocation, but before the exporter exports the completed spans.

@amber0612
Copy link
Contributor

I would like to work on this one. Can you please assign it to me. thanks

@brettmc
Copy link
Collaborator

brettmc commented Aug 25, 2022

Fixed by #788

@brettmc brettmc closed this as completed Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants