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

feat(cron): Add node cron library instrumentation docs #8816

Merged
merged 4 commits into from
Jan 5, 2024

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad requested review from gaprl, a team, anonrig and mydea and removed request for a team January 4, 2024 16:15
Copy link

vercel bot commented Jan 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 5, 2024 3:40pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
sentry-docs-next ⬜️ Ignored (Inspect) Visit Preview Jan 5, 2024 3:40pm

Copy link
Contributor

@shanamatthews shanamatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small comments, but overall looks good!


Use `Sentry.cron.instrumentNodeCron` to instrument cron export from the `node-cron` library. This returns an object with the same API as the original `cron` export, but with the `schedule` method instrumented. You can pass the name of the cron monitor and an optional timezone as part of the third options argument to the function.

Requires SDK version `7.92.0` or higher.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If both options have this as a prereq, should we move this line to directly under "Automatic Crons Instrumentation"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I'll make the change, good idea.

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) January 5, 2024 15:30
@AbhiPrasad AbhiPrasad merged commit 34f373c into master Jan 5, 2024
8 of 9 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-node-cron-lib-docs branch January 5, 2024 15:34
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants