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

@Scheduled is not instrumented and no trace context is created when aggregated in @Schedules #2255

Closed
lrozek opened this issue Jan 25, 2023 · 3 comments
Labels

Comments

@lrozek
Copy link

lrozek commented Jan 25, 2023

method annotated with *@schedules * is not instrumented, so no trace context is created.

@lrozek
Copy link
Author

lrozek commented Jan 25, 2023

reproduction can be found in https://github.com/lrozek/sleuth-repro-2255

Please note below logs produced by the the simple application.

  • only job1 method has trace context established due to usage of @scheduled
  • job2 method does not have trace context established. Single @scheduled is aggregated in @schedules
  • job3 method also does not have trace context established. This time two @scheduled annotation are aggregated in @schedules

My expectation is that @scheduled is instrumented regardless of the usage, ie standalone (job1 method) or aggregated (job2 and job3 method)

2023-01-25 12:16:30.945  INFO [,ab2b3e2cc679dd0c,ab2b3e2cc679dd0c] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job1: LazySpan(ab2b3e2cc679dd0c/ab2b3e2cc679dd0c)
2023-01-25 12:16:35.927  INFO [,,] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job2: null
2023-01-25 12:16:40.928  INFO [,,] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job3: null
2023-01-25 12:16:45.926  INFO [,,] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job3: null
2023-01-25 12:17:00.926  INFO [,9d324fbd7c802467,9d324fbd7c802467] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job1: LazySpan(9d324fbd7c802467/9d324fbd7c802467)
2023-01-25 12:17:05.926  INFO [,,] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job2: null
2023-01-25 12:17:10.927  INFO [,,] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job3: null
2023-01-25 12:17:15.927  INFO [,,] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job3: null
2023-01-25 12:17:30.926  INFO [,343bf822476eb6bf,343bf822476eb6bf] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job1: LazySpan(343bf822476eb6bf/343bf822476eb6bf)
2023-01-25 12:17:35.927  INFO [,,] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job2: null
2023-01-25 12:17:40.927  INFO [,,] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job3: null
2023-01-25 12:17:45.927  INFO [,,] 37677 --- [   scheduling-1] pl.lrozek.schedulinginstrumenting.Jobs   : job3: null

@lrozek lrozek changed the title @Schedules does not create trace context @Scheduled is not instrumented and no trace context is created when aggregated in Schedules Jan 25, 2023
@lrozek lrozek changed the title @Scheduled is not instrumented and no trace context is created when aggregated in Schedules @Scheduled is not instrumented and no trace context is created when aggregated in @Schedules Jan 25, 2023
@marcingrzejszczak
Copy link
Contributor

Yeah that feature was never supported. Since Sleuth is feature complete we're not planning to add this support here. However I've created an issue in Spring Framework spring-projects/spring-framework#29984 so that we don't forget to ensure that @Schedules is supported with SF 6.

@marcingrzejszczak marcingrzejszczak closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
@simonbasle
Copy link
Contributor

Rather see spring-projects/spring-framework#29883 (of which the above issue is a duplicate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants