New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align SDK with docs regarding session update for dropped events #2496
Align SDK with docs regarding session update for dropped events #2496
Conversation
else | ||
{ | ||
_options.LogDebug("Event not sampled."); | ||
} |
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.
else | |
{ | |
_options.LogDebug("Event not sampled."); | |
} |
Alternatively, this block could be moved one line up?
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.
It's mainly there for testing... so that we can ensure the order of processing when the sample rate is null.
The problem with putting it in the block where the sample rate is not null is that it would make the tests non-deterministic (you're rolling dice to see whether the tests pass then).
Or did you have something else in mind?
@@ -612,6 +613,68 @@ public void CaptureEvent_WithSampleRate_AppropriateDistribution(float sampleRate | |||
}); | |||
} | |||
|
|||
[Fact] | |||
public void CaptureEvent_Processing_Order() |
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.
That looks like it's been fun figuring out!
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.
Yes, deep in the weeds of NSubstitute!
LGTM! |
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- Align SDK with docs regarding session update for dropped events ([#2496](https://github.com/getsentry/sentry-dotnet/pull/2496)) If none of the above apply, you can opt out of this check by adding |
Completes Align SDK with docs regarding session update for dropped events #1599.
All of this now happens in the
SentryClient.DoSendEvent
method in the .NET SDK.Python
.NET
The CaptureEvent_Processing_Order ensures .NET SDK processing happens in the same order.