feat(node): Add ability to send cron monitor check ins#8039
Merged
AbhiPrasad merged 4 commits intodevelopfrom May 4, 2023
Merged
feat(node): Add ability to send cron monitor check ins#8039AbhiPrasad merged 4 commits intodevelopfrom
AbhiPrasad merged 4 commits intodevelopfrom
Conversation
Member
|
In Python and PHP, we opted to use |
Contributor
Author
|
Easy to understand - and means we don't further overload |
mydea
approved these changes
May 4, 2023
lforst
approved these changes
May 4, 2023
| release: '1.0.0', | ||
| environment: 'production', | ||
| } as CheckIn, | ||
| } as SerializedCheckIn, |
Contributor
There was a problem hiding this comment.
giga l: you can simply do as const instead of as SerializedCheckIn here. TS is only complaining because status is interpreted as string.
Contributor
Author
There was a problem hiding this comment.
Gonna keep this anyway because I prefer the explicitness of the type.
| }, | ||
| checkinMargin: 2, | ||
| maxRuntime: 12333, | ||
| timezone: 'Canada/Eastern', |
Contributor
Author
billyvg
pushed a commit
that referenced
this pull request
May 5, 2023
This was referenced Jul 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #8006
Sentry has a cron monitoring product! This PR adds cron monitoring support to the Node SDK, so you can use the SDK to easily monitor your cron jobs!
You can monitor your cron jobs by sending check-ins to Sentry whenever they start and stop! If you notice a cron hasn't checked in, or has not submitted a finish check-in, you know there is something wrong and you need to investigate!
Based on the work in #7996, we expose a top level API to send check ins to Sentry. Currently there is no hub level method to do this, that was done intentionally.
To send a check in to Sentry, simply use the
captureCheckInmethod exported from the SDK. First you must send anin_progress, checkin, then you can send one with statusokorerrorbased on what happened with your cron job.You can also optionally add a monitor config so you can create a monitor automatically, without needing to go into Sentry and setting up a cron monitor.
Added some basic unit tests, and validated sending in Sentry as well.