-
-
Notifications
You must be signed in to change notification settings - Fork 249
Open
Description
Maybe I am missing something - but shouldn't Telemetry Actions be set to Status error when... an error occurs?
In my code (in this case a QueueJob handler based on QueueJobBase<>) I had to wrap as following:
protected async override Task<JobResult> ProcessQueueEntryAsync(QueueEntryContext<IdpWorkItem> context)
{
try
{
......
}
catch (Exception ex)
{
Activity.Current?.SetStatus(ActivityStatusCode.Error, ex.Message);
Activity.Current?.RecordException(ex);
return JobResult.FromException(ex);
}
}Wouldn't be better to have that in here:
Foundatio/src/Foundatio/Jobs/QueueJobBase.cs
Line 137 in ae95423
| if (!queueEntry.IsCompleted && !queueEntry.IsAbandoned) |
Or even better here:
Foundatio/src/Foundatio/Jobs/JobRunner.cs
Line 213 in ae95423
| _logger.LogJobResult(result, _options.Name); |
I can find multiple places where this could be done (IMO the higher the better) - but is there any reason this was not done originally?
Thanks
Metadata
Metadata
Assignees
Labels
No labels