-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check-ins not working #8100
Comments
Hey @simplenotezy, thanks for writing in! It's not good that the checkins are not sending. Could you try enabling
and checking if there are any Sentry debug logs about sending checkins? I'm going to try to repro w/ and example nest.js app myself, but if you get the chance to provide a reproduction would be amazing for use to debug further! |
Hey folks, we've identified this bug - will fix with the next release. Sorry for the trouble! |
Hey we've released https://github.com/getsentry/sentry-javascript/releases/tag/7.52.0 with this being fixed. Could you guys upgrade and give it a try? Thanks! |
@AbhiPrasad Don't think it has worked. I tried locally but all jobs are still marked as 'missing'. I have pushed to production and will see how it goes over the next hours though, but don't think it's working |
@AbhiPrasad Nope, they still don't work unfortunately Also, for our Nest.js application, if we enable |
I tried reproducing this w/ a basic nestjs example: https://github.com/AbhiPrasad/gh-8100-nestjs-crons, but was unable to. Seems like there was a regression of us no longer emitting logs when sending checkIn's, let me fix that. Thanks for your patience! In the meantime, could you try adding this and seeing what gets logged out? // log out check in envelopes
Sentry.getCurrentHub()
.getClient()
.on('beforeEnvelope', (env) => {
const body = env[1];
const item = body[0];
if (item[0].type === 'check_in') {
console.log(item[1]);
}
}); You should see something like:
where the monitor slug/check in id are identical, and only the status changes (from in progress to ok/error). |
@AbhiPrasad I tried running the code you provided but that won't run for some reason. The .getClient() returns undefined. |
We started using cURL as mentioned, and then switched to your SDK. Since we did not pass over However, after switching to using the SDK it defaults to our Not sure if this could be a help for you in debugging the issue. |
This is intended behaviour, as the SDK API will use the SDK's set environment variable.
This is really strange, since a client has to be defined for Sentry to work. I recommend you put the snippet right below where you call |
Aha @AbhiPrasad I think that was the issue. Sentry was only being initialised during the main (http) server start, not the start of CLI. Let me push to prod and see if it changes anything. The cron popped up instantly: {
check_in_id: 'XXX',
monitor_slug: 'XXX',
status: 'in_progress',
release: undefined,
environment: 'local-mattias'
} |
Great! This maybe is something we have to document better. We can add a note to #5578 while we work on a more fleshed out NestJS SDK. |
@AbhiPrasad It's confirmed to be working! 😊
Really great news you're working on a NestJS SDK - that is sooo much needed. Let me know if you need any support in this regard / test case. We'd be happy to participate in Doubble! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
7.51.2
Framework Version
Nest.js 9.3.9
Link to Sentry event
https://doubble.sentry.io/crons/sync-amplitude/?environment=production&project=4505119808946176
SDK Setup
Steps to Reproduce
Basically I follow the documentation:
If I inspect the crons running I see:
Heres an example of what I did before, and how I refactored the code to use the built-in feature:
Expected Result
It should report OK in the Cron status console, because they are all running as expected
Actual Result
They all report "MISSED"
It worked fine when we weren't using the Sentry SDK but just sending normal http requests.
The text was updated successfully, but these errors were encountered: