diff --git a/docs/platforms/unreal/configuration/options.mdx b/docs/platforms/unreal/configuration/options.mdx index 6419c4eba75c60..a798ebe8a46cbc 100644 --- a/docs/platforms/unreal/configuration/options.mdx +++ b/docs/platforms/unreal/configuration/options.mdx @@ -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 must be defined to enable tracing. - - -Currently, there is no support for sampling functions on Windows or Linux (). - - - diff --git a/docs/platforms/unreal/tracing/index.mdx b/docs/platforms/unreal/tracing/index.mdx index 3fa95d300ffab8..1701a03dcec62c 100644 --- a/docs/platforms/unreal/tracing/index.mdx +++ b/docs/platforms/unreal/tracing/index.mdx @@ -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, will take precedence. - - -Currently there is no support for sampling functions on Windows/Linux (). - - - Learn more about tracing options, how to use the TracesSampler function, or how to sample transactions. diff --git a/platform-includes/performance/traces-sampler-as-sampler/unreal.mdx b/platform-includes/performance/traces-sampler-as-sampler/unreal.mdx index 58843aff2796c3..78123d31555882 100644 --- a/platform-includes/performance/traces-sampler-as-sampler/unreal.mdx +++ b/platform-includes/performance/traces-sampler-as-sampler/unreal.mdx @@ -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().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().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().Equals(TEXT("training"))) { // Training matches are just noise - drop all transactions samplingValue = 0.0;