Skip to content

Commit

Permalink
fix: Fixed duration calculation for Sentry.Hangfire crons checkIn (#3420
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vzhurintulaco committed Jun 14, 2024
1 parent b28c58d commit 8766994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sentry.Hangfire/SentryServerFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void OnPerformed(PerformedContext context)
}

var status = context.Exception is null ? CheckInStatus.Ok : CheckInStatus.Error;
var duration = context.BackgroundJob.CreatedAt - DateTime.Now;
var duration = DateTime.UtcNow - context.BackgroundJob.CreatedAt;

_ = _hub.CaptureCheckIn(monitorSlug, status, checkInId, duration: duration);
}
Expand Down

0 comments on commit 8766994

Please sign in to comment.