-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Prevent NullReferenceException in SentryTraceHeader Parsing #3757
Prevent NullReferenceException in SentryTraceHeader Parsing #3757
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## version-5.0.0 #3757 +/- ##
================================================
Coverage ? 76.54%
================================================
Files ? 381
Lines ? 13997
Branches ? 2818
================================================
Hits ? 10714
Misses ? 2595
Partials ? 688 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason you picked v5 branch for this fix? Would be great to put this out there for v4 too.
Oh, because it's a breaking change it seems?
Yeah, I guess it’s because I’m changing the signature of a public method. So the team asked me to open it to v5 instead of main. But I think it will be released soon since v5 will add support for .NET 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big thank you for the PR @Victorvhn and for fussing around with the branches. Much appreciated!
Hey y'all,
I recently encountered an issue where nearly every API request threw an exception after integrating Sentry with OpenTelemetry in my APIs. This issue only affected my environment, likely due to having Just My Code disabled in debugging options.
Upon investigation, I discovered that a null value was being passed to the
Parse
method inSentryTraceHeader.cs
. The method was attempting to call.Split()
on this null value, leading to anNullReferenceException
.To address this, I added a null check in the
Parse
method before calling.Split()
.Please review the changes when you have a chance and let me know if there are any additional adjustments or improvements you’d like to see. Thank you!
Moved from PR