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

Actual class names of spring boot application are wrapped by SpringSchedulingRunnablewrapper #6103

Closed
vasireddy99 opened this issue May 27, 2022 · 4 comments · Fixed by #6140
Labels
bug Something isn't working

Comments

@vasireddy99
Copy link
Contributor

Describe the bug
When using OTEL with Spring boot app, spring boot admin console wraps all actual classes with io.opentelemetry.javaagent.instrumentation.spring.scheduling.SpringSchedulingRunnablewrapper.

image

What did you expect to see?
It is expected to to see the actual classes and not to have the above wrapper as shown in the image.

What version are you using?
v1.14.0

@vasireddy99 vasireddy99 added the bug Something isn't working label May 27, 2022
@breedx-splk
Copy link
Contributor

Hi @vasireddy99 . The way that the Spring Scheduling instrumentation works is by wrapping Runnable instances with instrumentation code (in order to do tracing things, like create timed spans etc). It's unfortunate that Spring doesn't provide a more flexible instrumentation hook for this stuff, so this is what we kinda have to do. As a result, the Spring task runners only see the instrumentation classes.

If the Spring Scheduling instrumentation is getting in the way and causing problems, you should be able to disable it by passing -Dotel.instrumentation.spring-scheduling-3.1.enabled=false to the JVM.

@laurit
Copy link
Contributor

laurit commented May 30, 2022

As @breedx-splk mentioned this is because we wrap the Runnable instances passed to the constructor of org.springframework.scheduling.config.Task. To fix this we could try wrapping it at some later point, perhaps when any of the schedule methods are called on org.springframework.scheduling.TaskScheduler?

@breedx-splk
Copy link
Contributor

[...]we could try wrapping it at some later point, perhaps when any of the schedule methods are called on org.springframework.scheduling.TaskScheduler?

If that list in the screenshot is created within the schedule methods, though, the same problem would exist right?

@laurit
Copy link
Contributor

laurit commented May 31, 2022

[...]we could try wrapping it at some later point, perhaps when any of the schedule methods are called on org.springframework.scheduling.TaskScheduler?

If that list in the screenshot is created within the schedule methods, though, the same problem would exist right?

Yes, but I find it unlikely that it is filled there.

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

Successfully merging a pull request may close this issue.

3 participants