Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Paramore.Brighter/IAmAnOutbox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public interface IAmAnOutbox
/// We inject this so that we can use the same tracer as the calling application
/// You do not need to set this property as we will set it when setting up the External Service Bus
/// </summary>
IAmABrighterTracer Tracer { set; }
IAmABrighterTracer? Tracer { set; }
}
}
8 changes: 4 additions & 4 deletions src/Paramore.Brighter/OutboxProducerMediator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public partial class OutboxProducerMediator<TMessage, TTransaction> : IAmAnOutbo
private readonly int _maxOutStandingMessages;
private readonly TimeSpan _maxOutStandingCheckInterval;
private readonly Dictionary<string, object> _outBoxBag;
private readonly IAmABrighterTracer _tracer;
private readonly IAmABrighterTracer? _tracer;
private readonly TimeProvider _timeProvider;

/// <summary>
Expand All @@ -107,7 +107,7 @@ public OutboxProducerMediator(
IAmAMessageMapperRegistry mapperRegistry,
IAmAMessageTransformerFactory messageTransformerFactory,
IAmAMessageTransformerFactoryAsync messageTransformerFactoryAsync,
IAmABrighterTracer tracer,
IAmABrighterTracer? tracer,
IAmAPublicationFinder publicationFinder,
IAmAnOutbox? outbox = null,
IAmARequestContextFactory? requestContextFactory = null,
Expand Down Expand Up @@ -603,7 +603,7 @@ CancellationToken cancellationToken
await s_clearSemaphoreToken.WaitAsync(cancellationToken);

var parentSpan = requestContext.Span;
var span = _tracer.CreateClearSpan(CommandProcessorSpanOperation.Clear, requestContext.Span, null,
var span = _tracer?.CreateClearSpan(CommandProcessorSpanOperation.Clear, requestContext.Span, null,
_instrumentationOptions);
try
{
Expand Down Expand Up @@ -640,7 +640,7 @@ CancellationToken cancellationToken
}
finally
{
_tracer.EndSpan(span);
_tracer?.EndSpan(span);
s_clearSemaphoreToken.Release();
s_backgroundClearSemaphoreToken.Release();
}
Expand Down
Loading