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

Create new span when wrapping executor tasks #63

Open
pkoenig10 opened this issue Feb 6, 2019 · 1 comment
Open

Create new span when wrapping executor tasks #63

pkoenig10 opened this issue Feb 6, 2019 · 1 comment

Comments

@pkoenig10
Copy link
Member

pkoenig10 commented Feb 6, 2019

When running a task in a wrapped executor, a new span should be created for the task. This will allow tracing information to clearly indicate when the task started and finished running in the executor.

See #59 (comment).

bulldozer-bot bot pushed a commit that referenced this issue Feb 21, 2019
Fixes #63

~This PR preserves the existing executor wrapping methods and their behavior. So users must explicitly opt-in to the new span-creating behavior.~

This is no longer true. The existing executor methods will now create a new span for tasks they run.
@pkoenig10
Copy link
Member Author

There are actually cases where you don't want this. Specifically when chaining async tasks together. For example:

FluentFuture.from(future)
    .transform(result -> handleResult1(...), wrappedExecutor)
    .transform(result -> handleResult2(...), wrappedExecutor)

Each call to transform will create another nested span because the next callback is being enqueued inside the previous task. In this scenario it would be better to have no executor span to avoid this potentially long chain of nested spans.

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

No branches or pull requests

1 participant