Ev.ServiceBus
Ev.ServiceBus copied to clipboard
feature(#72) Improve Logging: Fix Duplicate Entries, Implement High-…
- Added
- new categorized Logging
- Ev.ServiceBus.LoggingExtensions.MessageProcessing : For logs related to message processing
- Ev.ServiceBus.LoggingExtensions.ServiceBusClientManagement : For logs related to creation of client / disposition of clients
- Ev.ServiceBus.LoggingExtensions.ServiceBusEngine : For logs related to the initialization of the Host
- Ev.ServiceBus.HealthChecks.LoggingExtensionsHealthChecks : For logs related to service bus health checks registration
- New telemetryOptions
- ActivitySource (Ev.ServiceBus) for message processing
- Ev.ServiceBus.Apm : Elastic Apm integration
- new categorized Logging
- Modified
- Reduce number of log entries and duplicate exception logging
- Use of high performance logging mechanism
[Breaking]
The exception catched during IMessageHandler was changed to FailedToProcessMessageException
Original exception is stored in the inner exception if you are using IExceptionHandler use this to get original message
public class CustomExceptionHandler : IExceptionHandler
{
public Task HandleExceptionAsync(ProcessErrorEventArgs args)
{
var original = exceptionEvent.Exception is FailedToProcessMessageException wrapperException
? wrapperException.InnerException!
: exceptionEvent.Exception!;
return Task.CompletedTask;
}
}