Skip to content

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

@nicohrubec

Description

@nicohrubec

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:

Metadata

Metadata

Assignees

Labels

Package: nestjsIssues related to the Sentry Nestjs SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions