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

Support scheduled tasks #418

Closed
ghost opened this issue Jan 13, 2019 · 8 comments
Closed

Support scheduled tasks #418

ghost opened this issue Jan 13, 2019 · 8 comments

Comments

@ghost
Copy link

ghost commented Jan 13, 2019

Hello,
what would you think about adding support for scheduling tasks in Spring?

@felixbarny
Copy link
Member

Creating Transactions for @Scheduled annotated methods which are within the application_packages sounds like a good idea. See also JaxRsTransactionNameInstrumentation for a similar implementation.

As a follow-up, creating spans for @Async annotated methods would also be cool, but requires on #145, which I'm currently working on.

@wolframhaussig
Copy link
Contributor

Could you also support the Quartz Jobs in Spring using org.springframework.scheduling.quartz.QuartzJobBean?

@felixbarny felixbarny changed the title support scheduled task of spring Support scheduled tasks Apr 4, 2019
@felixbarny
Copy link
Member

Also consider javax.ejb.Schedule

@timmhirsens
Copy link
Contributor

Is this currently being worked on? If not, i could give this a try.

@felixbarny
Copy link
Member

timmhirsens added a commit to timmhirsens/apm-agent-java that referenced this issue Apr 9, 2019
This is a very basic implementation of elastic#418
@videnkz
Copy link
Contributor

videnkz commented Apr 30, 2019

hi @fr1zle , is it work now?
I tested with:
@Scheduled(cron = "*/15 * * * * *")
@Scheduled(fixedDelay = 5)
but no transaction was created.

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.5.RELEASE</version>
</parent>

@felixbarny
Copy link
Member

This is released as of 1.6.0. Note that you have to configure application_packages for it to work.

@videnkz
Copy link
Contributor

videnkz commented Apr 30, 2019

Great! It works. I setted incorrect package.

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

5 participants