File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
platform-includes/performance/traces-sampler-as-sampler Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,27 @@ class USomeTraceSampler : public USentryTraceSampler
77public:
88 virtual bool Sample_Implementation(USentrySamplingContext* samplingContext, float& samplingValue) override
99 {
10- const FString & path =
11- * samplingContext - > GetCustomSamplingContext ().Find (" __HttpPath " );
10+ const FString & gameMode =
11+ * samplingContext - > GetCustomSamplingContext ().Find (" GameMode " );
1212
13- if (path .Equals (TEXT (" /payment " )))
13+ if (gameMode .Equals (TEXT (" ranked " )))
1414 {
15- // These are important - take a big sample
15+ // Ranked matches are important - take a big sample
1616 samplingValue = 0.5 ;
1717 }
18+ else if (gameMode .Equals (TEXT (" quick_match" )))
19+ {
20+ // Quick matches less important and happen more frequently - only take 20%
21+ samplingValue = 0.2 ;
22+ }
23+ else if (gameMode .Equals (TEXT (" training" )))
24+ {
25+ // Training matches are just noise - drop all transactions
26+ samplingValue = 0.0 ;
27+ }
1828 else
1929 {
20- // Default sample rate
30+ // Default sample rate for other game modes
2131 samplingValue = 0.1 ;
2232 }
2333
You can’t perform that action at this time.
0 commit comments