Repository navigation
Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.4.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
const sentryConfig: Sentry.NodeOptions = {
debug: false,
normalizeDepth: 0,
maxValueLength: 1000,
tracePropagationTargets: ['NONE'],
dsn: process.env.SENTRY_DSN,
environment: process.env.ENVIRONMENT,
beforeSend: (sentryEvent) => {
console.error(`Reporting to Sentry: ${sentryEvent.event_id ?? 'undefined'}`);
return sentryEvent;
},
};
if (process.env.RELEASE && process.env.RELEASE !== 'N/A') {
sentryConfig.release = process.env.RELEASE;
}
Sentry.init(sentryConfig);
Steps to Reproduce
Call Sentry.captureCheckIn() with a failure_issue_threshold value:
Sentry.captureCheckIn(
{
monitorSlug: 'example-cron',
status: 'in_progress',
},
{
schedule: {
type: 'crontab',
value: '* * * * *',
},
timezone: 'UTC',
checkinMargin: 3,
maxRuntime: 10,
failure_issue_threshold: 2,
}
);The failure_issue_threshold is documented as an acceptable key in the TypeScript types:
| failure_issue_threshold?: number; |
Expected Result
I would expect the failure issue threshold to be 2.
On a side note, I would expect the failure_issue_threshold key to be named failureIssueThreshold instead, to be consistent with the other keys, like checkinMargin and maxRuntime.
Actual Result
The "failure tolerance" setting in the UI remains 1 (the default):
I suspect this issue might also affect the recovery_threshold value, but I haven't tested it.
Metadata
Metadata
Assignees
Labels
No labels
Projects
- StatusShow more project fieldsNo status
Activity
AbhiPrasad commentedon May 24, 2024
@WesCossick - we aren't passing this in properly 🤦
I'll make a PR to fix this! Sorry for the trouble - thank you for reporting!
AbhiPrasad commentedon May 27, 2024
Opened #12248 to fix, and getsentry/sentry-docs#10168 to document this.
fix(core): Pass in cron monitor config correctly (#12248)
AbhiPrasad commentedon May 29, 2024
Fix released with https://github.com/getsentry/sentry-javascript/releases/tag/8.7.0!
New options:
failureIssueThreshold:requires SDK version
8.7.0or higherThe number of consecutive failed check-ins required before an issue can be created. Optional.
recoveryThreshold:requires SDK version
8.7.0or higherThe number of consecutive successful check-ins required for an issue to be considered resolved. Optional.
WesCossick commentedon May 29, 2024
Thanks for the quick fix!