/// <summary> /// Logs that a work-item fetched failed with an unhandled exception. /// </summary> /// <param name="context">The dispatcher context.</param> /// <param name="exception">The exception associted with the failure.</param> internal void FetchWorkItemFailure(WorkItemDispatcherContext context, Exception exception) { if (this.IsStructuredLoggingEnabled) { this.WriteStructuredLog( new LogEvents.FetchWorkItemFailure(context, exception), exception); } }
/// <summary> /// Logs that we're starting to fetch a new work item. /// </summary> /// <param name="context">The dispatcher context.</param> /// <param name="timeout">The fetch timeout.</param> /// <param name="concurrentWorkItemCount">The current number of concurrent work items.</param> /// <param name="maxConcurrentWorkItems">The maximum number of concurrent work items.</param> internal void FetchWorkItemStarting( WorkItemDispatcherContext context, TimeSpan timeout, int concurrentWorkItemCount, int maxConcurrentWorkItems) { if (this.IsStructuredLoggingEnabled) { this.WriteStructuredLog( new LogEvents.FetchWorkItemStarting( context, timeout, concurrentWorkItemCount, maxConcurrentWorkItems)); } }
/// <summary> /// Logs that a work-item was fetched successfully. /// This event does not have enough context to understand the details of the work item. /// </summary> /// <param name="context">The dispatcher context.</param> /// <param name="workItemId">The ID of the fetched work item.</param> /// <param name="latency">The latency of the fetch operation.</param> /// <param name="concurrentWorkItemCount">The current number of concurrent work items.</param> /// <param name="maxConcurrentWorkItems">The maximum number of concurrent work items.</param> internal void FetchWorkItemCompleted( WorkItemDispatcherContext context, string workItemId, TimeSpan latency, int concurrentWorkItemCount, int maxConcurrentWorkItems) { if (this.IsStructuredLoggingEnabled) { this.WriteStructuredLog( new LogEvents.FetchWorkItemCompleted( context, workItemId, latency, concurrentWorkItemCount, maxConcurrentWorkItems)); } }