getsentry/sentry-dotnet

Crons doesn't work

Opened this issue · 3 comments

I added 2 monitors in this PR a few weeks ago:

I was hoping it would just work, since hangfire has the information about how often the job should run etc and docs have no reference about upserting not being supported.

Since there is not instruction for .NET (plain .NET nor Hangfire, my use case), I commented about it here:

So because of that I created a type CLI:
I used the same monitor name as I added to code: NuGetCatalogImporter.Import. I was hoping the name would also be automatic given we know that in the code, but that's a separate feature request filed here:

After creating it manually I saw:
image

But it created one telling me the slug is nugetcatalogimporterimport. Does that mean the id I added to code won't work?

What's more concerning is that I don't see any dropped crons:
image

Is the SDK sending pings but it's not showing because I didn't create the monitor correctly? If so, should it at least show as dropped crons checkins in the Stats page?

I'm not sure how to proceed to get Crons working with .NET

I think Hangfire explicitly wants monitor slug, not monitor name. So try changing "NuGetCatalogImporter.Import" to "nugetcatalogimporterimport". You dont see dropped crons because of this, to be considered "dropped" monitor should checkin first with status: CheckinStatus.InProgress.

I was hoping it would just work

This is something the ability to upsert those monitors will greatly improve on.

I think Hangfire explicitly wants monitor slug, not monitor name. So try changing "NuGetCatalogImporter.Import" to "nugetcatalogimporterimport". You dont see dropped crons because of this, to be considered "dropped" monitor should checkin first with status: CheckinStatus.InProgress.

I went through onboarding, added the Monitor attribute and expected it to work. Then nothing happened, I found out that upsert doesn't work and I have to create by hand. After doing that, I couldn't control to slug. So I need to make another code change and deploy it live.

In summary this was a pretty bad UX and I'm not very motivated to fix this now. And also I don't even know if it's sending data and being rejected since stats show 0 crons. So is the SDK sending crons with the wrong slug? If so shouldn't I see that somewhere?