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

Add automatic cron monitoring support to @sentry/nestjs #12770

Closed
Tracked by #12504
nicohrubec opened this issue Jul 4, 2024 · 0 comments · Fixed by #12781
Closed
Tracked by #12504

Add automatic cron monitoring support to @sentry/nestjs #12770

nicohrubec opened this issue Jul 4, 2024 · 0 comments · Fixed by #12781
Assignees
Labels
Package: nestjs Issues related to the Sentry Nestjs SDK

Comments

@nicohrubec
Copy link
Contributor

nicohrubec commented Jul 4, 2024

https://docs.nestjs.com/techniques/task-scheduling

Potentially already somewhat supported through node, but even if that is the case we should support this in a more Nest native way. One idea could be to add a custom decorator that expands the functionality of the existing @Cron decorator to call the sentry cron logic.

In theory, we could also patch the @Cron nest decorator directly to add this logic. We would have to add an extra parameter so that users can provide a MonitorConfig and the slug.

Solution: Add a new @SentryCron decorator that converts the function to a sentry node cron job.

Useful links:

@nicohrubec nicohrubec mentioned this issue Jul 4, 2024
@nicohrubec nicohrubec changed the title Add automatic cron monitoring support - https://docs.nestjs.com/techniques/task-scheduling Add automatic cron monitoring support to NestJS Jul 4, 2024
@nicohrubec nicohrubec self-assigned this Jul 4, 2024
@AbhiPrasad AbhiPrasad added the Package: nestjs Issues related to the Sentry Nestjs SDK label Jul 4, 2024
@nicohrubec nicohrubec changed the title Add automatic cron monitoring support to NestJS Add automatic cron monitoring support to @sentry/nestjs Jul 5, 2024
@nicohrubec nicohrubec linked a pull request Jul 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nestjs Issues related to the Sentry Nestjs SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants