Open nsweeting opened 1 week ago
Thanks for the report! This is helpful. @savhappy do you have time to take a look at this?
@whatyouhide yep yep! Will get to this tomorrow.
@nsweeting thanks for the direction! It does appear a different check_in_id is being passed each time for every call because the ref is changing. Perhaps we can pass in a :name instead or use telemetry to track jobs. I'll dig a bit more
@savhappy thank you! The only other way (that I can think of) to get the check-in ID returned by Sentry in the :in_progress
check in and use it for the :ok
check in is this: we store check-in IDs in an ETS table keyed by Quantum cron job ID and then we fetch it later on. But let's see if :name
works out.
Update: The envelope isn't utilizing the correct id, instead of using the check_in structs id, we generate a new UUID every time and set this as the event_id. This also means Oban isn't working right.
After correcting this, we have the problem of the cron jobs setting a check_in_id
in the incorrect format (non UUIDs) as the docs mention the requirement of event_id's being a UUID. @whatyouhide's suggestion of storing the cron job id in an ETS table and mapping it to an eventid UUID seems to be the best solution. Working on this ^^
Environment
erlang 26.2.5.1 elixir 1.17.1-otp-26 sentry 10.6.2
Steps to Reproduce
:dbg
.Expected Result
Check-ins should show in the sentry UI when a quantum job runs.
Actual Result
No check-ins occur.
I can manually trigger a check in as specified in the docs.
This is different than what the quantum integration does though. The integration passes its own
check_in_id
for the:in_progress
check. The same id is used for the final:ok
check in.https://github.com/getsentry/sentry-elixir/blob/68fbfb5707620913efdf1ac06735470f4a0d5a8f/lib/sentry/integrations/quantum/cron.ex#L65
It appears that sentry expects the ID that is returned from the first
:in_progress
check in to be passed to the final:ok
check in. When manually doing this - the check in is successful.