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
6 changes: 0 additions & 6 deletions docs/platforms/unreal/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,4 @@ A number between `0` and `1`, controlling the percentage chance a given transact

A function responsible for determining the percentage chance a given transaction will be sent to Sentry. It will automatically be passed information about the transaction and the context in which it's being created, and must return a number between `0` (0% chance of being sent) and `1` (100% chance of being sent). Can also be used for filtering transactions, by returning 0 for those that are unwanted. Either this or <PlatformIdentifier name="traces-sample-rate" /> must be defined to enable tracing.

<Alert>

Currently, there is no support for sampling functions on Windows or Linux (<PlatformIdentifier name="traces-sampler" />).

</Alert>

</ConfigKey>
6 changes: 0 additions & 6 deletions docs/platforms/unreal/tracing/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ First, enable tracing and configure the sample rate for transactions. Set the sa

The two options are meant to be mutually exclusive. If you set both, <PlatformIdentifier name="traces-sampler" /> will take precedence.

<Alert>

Currently there is no support for sampling functions on Windows/Linux (<PlatformIdentifier name="traces-sampler" />).

</Alert>

<PlatformContent includePath="performance/configure-sample-rate" />

Learn more about tracing <PlatformLink to="/configuration/options/#tracing-options">options</PlatformLink>, how to use the <PlatformLink to="/configuration/sampling/#setting-a-sampling-function">TracesSampler</PlatformLink> function, or how to <PlatformLink to="/configuration/sampling/#sampling-transaction-events">sample transactions</PlatformLink>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ class USomeTraceSampler : public USentryTraceSampler
public:
virtual bool Sample_Implementation(USentrySamplingContext* samplingContext, float& samplingValue) override
{
const FString& gameMode =
const FSentryVariant& gameMode =
*samplingContext->GetCustomSamplingContext().Find("GameMode");

if (gameMode.Equals(TEXT("ranked")))
if (gameMode.GetValue<FString>().Equals(TEXT("ranked")))
{
// Ranked matches are important - take a big sample
samplingValue = 0.5;
}
else if (gameMode.Equals(TEXT("quick_match")))
else if (gameMode.GetValue<FString>().Equals(TEXT("quick_match")))
{
// Quick matches less important and happen more frequently - only take 20%
samplingValue = 0.2;
}
else if (gameMode.Equals(TEXT("training")))
else if (gameMode.GetValue<FString>().Equals(TEXT("training")))
{
// Training matches are just noise - drop all transactions
samplingValue = 0.0;
Expand Down
Loading