Description
How do you use Sentry?
Sentry SaaS (sentry.io)
SDK version
0.330
Go version
No response
Are you using Go Modules?
yes
Steps to reproduce
Lines 572 to 577 in 5af1e59
This is generating a new UUID when the ID is not specified. This means you cannot use the Go SDK to do check-ins without a check-in ID, which is a supported case.
// 🟡 Notify Sentry your job is running:
sentry.CaptureCheckIn(
&sentry.CheckIn{
MonitorSlug: "<monitor-slug>",
Status: sentry.CheckInStatusInProgress,
},
monitorConfig,
)
// Execute your scheduled task here...
// 🟢 Notify Sentry your job has completed successfully:
sentry.CaptureCheckIn(
&sentry.CheckIn{
MonitorSlug: "<monitor-slug>",
Status: sentry.CheckInStatusOK,
},
monitorConfig,
)
This code should work and it should send 00000000-0000-0000-0000-000000000000
as the check_in_id
as documented here https://develop.sentry.dev/sdk/telemetry/check-ins/#cron-monitor-check-in-payload
This may be provided as a empty UUID (128 bit zero value) to indicate to Sentry that the checkin should update the most recent "in_progress" check-in. If the most recent check-in is not in progress a new one will be created instead.
Expected result
00000000-0000-0000-0000-000000000000
is sent as the check_in_id
when not specified
Actual result
A new GUID is generated when when no check_in_id is specified.