Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Trace Sample generates extra traces #1978

Closed
meltsufin opened this issue Oct 9, 2019 · 4 comments · Fixed by #2011
Closed

Trace Sample generates extra traces #1978

meltsufin opened this issue Oct 9, 2019 · 4 comments · Fixed by #2011

Comments

@meltsufin
Copy link
Contributor

When running the sample, we expect to just see one trace per user request, but instead we see many addition traces called async that seem to have nothing to do with the request.

image

@meltsufin meltsufin added the trace label Oct 9, 2019
@meltsufin
Copy link
Contributor Author

@adriancole FYI

@meltsufin
Copy link
Contributor Author

One workaround is to exclude the traceSenderThreadPool bean from being traced by setting this property:

spring.sleuth.async.ignoredBeans=traceSenderThreadPool

@meltsufin meltsufin added the P1 label Oct 9, 2019
@meltsufin
Copy link
Contributor Author

Ultimately we need to make sure that all of our thread pool beans are not instrumented by Sleuth.

codefromthecrypt pushed a commit to spring-cloud/spring-cloud-sleuth that referenced this issue Oct 10, 2019
Recently, `AsyncAutoConfiguration` auto-instruments executors. This
causes spans named 'async' with no tag or other metadata to help
understand what is happening. It was somewhat difficult troubleshooting
this because the control is by bean name, but for example the "async"
span doesn't include the bean name.

For starters, this allows people to opt-out of automatically spanning
executors via `spring.sleuth.async.enabled=false`

See spring-attic/spring-cloud-gcp#1978
cc @meltsufin @saturnism
@meltsufin meltsufin added the awaiting waiting for something external label Oct 10, 2019
codefromthecrypt pushed a commit to spring-cloud/spring-cloud-sleuth that referenced this issue Oct 23, 2019
Recently, `AsyncAutoConfiguration` auto-instruments executors. This
causes spans named 'async' with no tag or other metadata to help
understand what is happening. It was somewhat difficult troubleshooting
this because the control is by bean name, but for example the "async"
span doesn't include the bean name.

For starters, this allows people to opt-out of automatically spanning
executors via `spring.sleuth.async.enabled=false`

See spring-attic/spring-cloud-gcp#1978
cc @meltsufin @saturnism
marcingrzejszczak pushed a commit to spring-cloud/spring-cloud-sleuth that referenced this issue Oct 23, 2019
* Adds the possibility to opt-out of executor decoration

Recently, `AsyncAutoConfiguration` auto-instruments executors. This
causes spans named 'async' with no tag or other metadata to help
understand what is happening. It was somewhat difficult troubleshooting
this because the control is by bean name, but for example the "async"
span doesn't include the bean name.

See spring-attic/spring-cloud-gcp#1978
@meltsufin
Copy link
Contributor Author

We need to add spring.sleuth.scheduled.enabled=false to our sample and also document this in refdocs.

@meltsufin meltsufin removed the awaiting waiting for something external label Oct 23, 2019
meltsufin added a commit that referenced this issue Nov 4, 2019
Also document the use of `spring.sleuth.scheduled.enabled=false`, which
is used to disable automatic instrumentation of executors by Sleuth.

Fixes: #1978.
meltsufin added a commit that referenced this issue Nov 5, 2019
Also document the use of `spring.sleuth.scheduled.enabled=false`, which
is used to disable automatic instrumentation of executors by Sleuth.

Fixes: #1978.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

1 participant