From 511c5a6d81ee176cfbe91a9c3c64cf398d881d68 Mon Sep 17 00:00:00 2001 From: jeevan-vj Date: Wed, 29 Jan 2025 14:16:09 +1300 Subject: [PATCH 1/2] fix: correct log warning format for LogWarning --- .../DiagnosticSource/EFCommandDiagnosticSourceHelper.cs | 4 ++-- .../DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFCommandDiagnosticSourceHelper.cs b/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFCommandDiagnosticSourceHelper.cs index baccd1366d..930c4a0d4a 100644 --- a/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFCommandDiagnosticSourceHelper.cs +++ b/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFCommandDiagnosticSourceHelper.cs @@ -34,7 +34,7 @@ private static void SetCommandId(ISpan span, Guid? commandId) span.Operation == Operation && TryGetCommandId(span) == commandId); } - Options.LogWarning("No correlation id found for {1}.", Operation); + Options.LogWarning("No correlation id found for {0}.", Operation); return null; } @@ -49,6 +49,6 @@ protected override void SetSpanReference(ISpan span, object? diagnosticSourceVal } return; } - Options.LogWarning("No correlation id can be set for {1}.", Operation); + Options.LogWarning("No correlation id can be set for {0}.", Operation); } } diff --git a/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs b/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs index 6f27286505..ba16b04ce2 100644 --- a/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs +++ b/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs @@ -22,7 +22,7 @@ internal EFConnectionDiagnosticSourceHelper(IHub hub, SentryOptions options) : b span.Operation == Operation && TryGetConnectionId(span) == connectionId); } - Options.LogWarning("No correlation id found for {1}.", Operation); + Options.LogWarning("No correlation id found for {0}.", Operation); return null; } From 68fdd3868a4776c7f8412bbbc4c78201d5905de7 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Fri, 31 Jan 2025 11:46:16 +1300 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae68fdbfdc..70ffca7d3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### Fixes - Fixed duplicate SentryMauiEventProcessors ([#3905](https://github.com/getsentry/sentry-dotnet/pull/3905)) +- Fixed invalid string.Format index in Debug logs for the DiagnosticSource integration ([#3923](https://github.com/getsentry/sentry-dotnet/pull/3923)) ### Dependencies