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
7.83.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
Sentry.init({
dsn: __MY_DSN__,
tracesSampleRate: 1.0,
});
Steps to Reproduce
Read Heartbeat
sub-section in Set Up Crons
docs: https://docs.sentry.io/platforms/node/crons/#heartbeat
Attempt to setup a call to Sentry.captureCheckIn
as demonstrated in the docs:
// src/init.ts
Sentry.captureCheckIn({
monitorSlug: 'discordbot-heartbeat',
status: 'ok',
});
Expected Result
TypeScript to be happy and allow me to capture my heartbeat check-in.
Actual Result
$ tsc
src/init.ts:23:29 - error TS2345: Argument of type '{ monitorSlug: string; status: "ok"; }' is not assignable to parameter of type 'CheckIn'.
Property 'checkInId' is missing in type '{ monitorSlug: string; status: "ok"; }' but required in type 'FinishedCheckIn'.
23 Sentry.captureCheckIn({
~
24 monitorSlug: 'discordbot-heartbeat',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 status: 'ok',
~~~~~~~~~~~~~~~~~~~~~
26 });
~~~~~~~
node_modules/@sentry/types/types/checkin.d.ts:36:5
36 checkInId: SerializedCheckIn['check_in_id'];
~~~~~~~~~
'checkInId' is declared here.
Found 1 error in src/init.ts:23
Metadata
Metadata
Assignees
Type
Projects
Status
No status