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/Sentry/GlobalSessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void DeletePersistedSession()
try
{
var contents = _options.FileSystem.ReadAllTextFromFile(filePath);
_options.LogDebug("Deleting persisted session file with contents: {0}", contents);
_options.LogDebug("Deleting persisted session file with contents: '{0}'", contents);
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/Internal/BackgroundWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private async Task DoWorkAsync()
}
finally
{
_options.LogDebug("De-queueing event {0}", eventId);
_options.LogDebug("De-queueing event '{0}'", eventId);
_queue.TryDequeue(out _);
Interlocked.Decrement(ref _currentItems);
OnFlushObjectReceived?.Invoke(envelope, EventArgs.Empty);
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/Internal/DebugStackTrace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ internal void MergeDebugImagesInto(SentryEvent @event)
// Frame indexes may be changed as well as _debugImageIndexByModule becoming invalid.
if (_debugImagesMerged)
{
_options.LogWarning("Cannot call MergeDebugImagesInto multiple times. Event: {0}", @event.EventId);
_options.LogWarning("Cannot call MergeDebugImagesInto multiple times. Event: '{0}'", @event.EventId);
return;
}
_debugImagesMerged = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal class DuplicateEventDetectionEventProcessor : ISentryEventProcessor
{
if (_capturedObjects.TryGetValue(@event, out _))
{
_options.LogDebug("Same event instance detected and discarded. EventId: {0}", @event.EventId);
_options.LogDebug("Same event instance detected and discarded. EventId: '{0}'", @event.EventId);
return null;
}
_capturedObjects.Add(@event, null);
Expand All @@ -38,7 +38,7 @@ private bool IsDuplicate(Exception ex, SentryId eventId, bool debugLog)
{
if (debugLog)
{
_options.LogDebug("Duplicate Exception: 'SameExceptionInstance'. Event {0} will be discarded.", eventId);
_options.LogDebug("Duplicate Exception: 'SameExceptionInstance'. Event '{0}' will be discarded.", eventId);
}
return true;
}
Expand All @@ -52,7 +52,7 @@ private bool IsDuplicate(Exception ex, SentryId eventId, bool debugLog)
var result = aex.InnerExceptions.Any(e => IsDuplicate(e, eventId, false));
if (result)
{
_options.LogDebug("Duplicate Exception: 'AggregateException'. Event {0} will be discarded.", eventId);
_options.LogDebug("Duplicate Exception: 'AggregateException'. Event '{0}' will be discarded.", eventId);
}

return result;
Expand All @@ -63,7 +63,7 @@ private bool IsDuplicate(Exception ex, SentryId eventId, bool debugLog)
{
if (IsDuplicate(ex.InnerException, eventId, false))
{
_options.LogDebug("Duplicate Exception: 'SameExceptionInstance'. Event {0} will be discarded.", eventId);
_options.LogDebug("Duplicate Exception: 'SameExceptionInstance'. Event '{0}' will be discarded.", eventId);
return true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Sentry/Internal/Http/CachingTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,15 @@ private async Task InnerProcessCacheAsync(string file, CancellationToken cancell

try
{
_options.LogDebug("Sending cached envelope: {0}",
_options.LogDebug("Sending cached envelope: '{0}'",
envelope.TryGetEventId(_options.DiagnosticLogger));

await _innerTransport.SendEnvelopeAsync(envelope, cancellation).ConfigureAwait(false);
}
// OperationCancel should not log an error
catch (OperationCanceledException ex)
{
_options.LogDebug("Canceled sending cached envelope: {0}, retrying after a delay.", ex, file);
_options.LogDebug("Canceled sending cached envelope: '{0}', retrying after a delay.", ex, file);
// Let the worker catch, log, wait a bit and retry.
throw;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/Internal/Hub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ private void AddBreadcrumbForException(SentryEvent evt, Scope scope)
}
catch (Exception e)
{
_options.LogError(e, "Failure to store breadcrumb for exception event: {0}", evt.EventId);
_options.LogError(e, "Failure to store breadcrumb for exception event: '{0}'", evt.EventId);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/Internal/MainSentryEventProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public MainSentryEventProcessor(

public SentryEvent Process(SentryEvent @event)
{
_options.LogDebug("Running main event processor on: Event {0}", @event.EventId);
_options.LogDebug("Running main event processor on: Event '{0}'", @event.EventId);

if (TimeZoneInfo.Local is { } timeZoneInfo)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/Internal/SentryEventHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal static class SentryEventHelper
return @event;
}

options.LogDebug("Calling the BeforeSend callback");
options.LogDebug("Calling the BeforeSend callback.");
try
{
@event = options.BeforeSendInternal?.Invoke(@event, hint);
Expand Down
4 changes: 2 additions & 2 deletions src/Sentry/SentryClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public SentryId CaptureEvent(SentryEvent? @event, Scope? scope = null, SentryHin
}
catch (Exception e)
{
_options.LogError(e, "An error occurred when capturing the event {0}.", @event.EventId);
_options.LogError(e, "An error occurred when capturing the event '{0}'.", @event.EventId);
return SentryId.Empty;
}
}
Expand Down Expand Up @@ -445,7 +445,7 @@ public bool CaptureEnvelope(Envelope envelope)
}

_options.LogWarning(
"The attempt to queue the event failed. Items in queue: {0}",
"The attempt to queue the event failed. Items in queue: '{0}'",
Worker.QueuedItems);

return false;
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/SentryPropagationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public DynamicSamplingContext GetOrCreateDynamicSamplingContext(SentryOptions op
{
if (_dynamicSamplingContext is null)
{
options.LogDebug("Creating the Dynamic Sampling Context from the Propagation Context");
options.LogDebug("Creating the Dynamic Sampling Context from the Propagation Context.");
_dynamicSamplingContext = this.CreateDynamicSamplingContext(options, replaySession);
}

Expand Down
8 changes: 4 additions & 4 deletions src/Sentry/TransactionTracer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,10 @@ public void Clear()
/// <inheritdoc />
public void Finish()
{
_options?.LogDebug("Attempting to finish Transaction {0}.", SpanId);
_options?.LogDebug("Attempting to finish Transaction '{0}'.", SpanId);
if (Interlocked.Exchange(ref _cancelIdleTimeout, 0) == 1)
{
_options?.LogDebug("Disposing of idle timer for Transaction {0}.", SpanId);
_options?.LogDebug("Disposing of idle timer for Transaction '{0}'.", SpanId);
_idleTimer?.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);
_idleTimer?.Dispose();
}
Expand All @@ -374,14 +374,14 @@ public void Finish()
// Normally we wouldn't start transactions for Sentry requests but when instrumenting with OpenTelemetry
// we are only able to determine whether it's a sentry request or not when closing a span... we leave these
// to be garbage collected and we don't want idle timers triggering on them
_options?.LogDebug("Transaction {0} is a Sentry Request. Don't complete.", SpanId);
_options?.LogDebug("Transaction '{0}' is a Sentry Request. Don't complete.", SpanId);
return;
}

TransactionProfiler?.Finish();
Status ??= SpanStatus.Ok;
EndTimestamp ??= _stopwatch.CurrentDateTimeOffset;
_options?.LogDebug("Finished Transaction {0}.", SpanId);
_options?.LogDebug("Finished Transaction '{0}'.", SpanId);

// Clear the transaction from the scope and regenerate the Propagation Context
// We do this so new events don't have a trace context that is "older" than the transaction that just finished
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void MergeDebugImages_MultipleCalls_LogsWarning()

logger.Received(1).Log(
SentryLevel.Warning,
"Cannot call MergeDebugImagesInto multiple times. Event: {0}",
"Cannot call MergeDebugImagesInto multiple times. Event: '{0}'",
null,
Arg.Any<SentryId>()
);
Expand Down
Loading