Skip to content

The failure_issue_threshold does not take effect #12217

@WesCossick

Description

@WesCossick

Is there an existing issue for this?

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):

Screenshot 2024-05-24 at 9 45 20 AM

I suspect this issue might also affect the recovery_threshold value, but I haven't tested it.

Metadata

Metadata

Assignees

Labels

Package: nodeIssues related to the Sentry Node SDK

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions