Skip to content

Commit 4d36f00

Browse files
SimonCropplucas-zimerman
andauthoredOct 26, 2021
assert guids not empty (#1244)
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
1 parent 317d4ad commit 4d36f00

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/Sentry.DiagnosticSource/Internals/DiagnosticSource/SentrySqlListener.cs

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Diagnostics;
34
using System.Linq;
45
using Sentry.Extensibility;
56
using Sentry.Internal.Extensions;
@@ -51,11 +52,15 @@ public SentrySqlListener(IHub hub, SentryOptions options)
5152

5253
private void SetConnectionId(ISpan span, Guid? connectionId)
5354
{
55+
Debug.Assert(connectionId != Guid.Empty);
56+
5457
span.SetExtra(ConnectionExtraKey, connectionId);
5558
}
5659

5760
private void SetOperationId(ISpan span, Guid? operationId)
5861
{
62+
Debug.Assert(operationId != Guid.Empty);
63+
5964
span.SetExtra(OperationExtraKey, operationId);
6065
}
6166

0 commit comments

Comments
 (0)
Please sign in to comment.