1- from sentry .dynamic_sampling .rules .biases .boost_environments_bias import (
2- BoostEnvironmentsBias ,
3- BoostEnvironmentsBiasV2 ,
4- )
1+ from sentry .dynamic_sampling .rules .biases .boost_environments_bias import BoostEnvironmentsBias
52from sentry .dynamic_sampling .rules .biases .boost_key_transactions_bias import (
63 BoostKeyTransactionsBias ,
7- BoostKeyTransactionsBiasV2 ,
8- )
9- from sentry .dynamic_sampling .rules .biases .boost_latest_releases_bias import (
10- BoostLatestReleasesBias ,
11- BoostLatestReleasesBiasV2 ,
12- )
13- from sentry .dynamic_sampling .rules .biases .ignore_health_checks_bias import (
14- IgnoreHealthChecksBias ,
15- IgnoreHealthChecksBiasV2 ,
164)
17- from sentry .dynamic_sampling .rules .biases .uniform_bias import UniformBias , UniformBiasV2
5+ from sentry .dynamic_sampling .rules .biases .boost_latest_releases_bias import BoostLatestReleasesBias
6+ from sentry .dynamic_sampling .rules .biases .ignore_health_checks_bias import IgnoreHealthChecksBias
7+ from sentry .dynamic_sampling .rules .biases .uniform_bias import UniformBias
188from sentry .dynamic_sampling .rules .combinators .base import BiasesCombinator
199from sentry .dynamic_sampling .rules .combinators .ordered_combinator import OrderedBiasesCombinator
2010from sentry .dynamic_sampling .rules .utils import RuleType
2111
2212
2313def get_relay_biases_combinator () -> BiasesCombinator :
24- # The default combinator is the ordered combinator, which will keep the insertion order of the rules.
2514 default_combinator = OrderedBiasesCombinator ()
2615
27- # The combination depends on the default_combinator used but in case of the ordered combinator the first combined
28- # rule will be the first rule in the output (e.g., UNIFORM_RULE will be the last).
29- #
30- # The ordering is very important, especially because relay performs matching following a FIFO matching algorithm.
31- #
32- # If you need to add any new bias, add it here after having created all the necessary classes.
3316 default_combinator .add (RuleType .BOOST_KEY_TRANSACTIONS_RULE , BoostKeyTransactionsBias ())
3417 default_combinator .add (RuleType .IGNORE_HEALTH_CHECKS_RULE , IgnoreHealthChecksBias ())
3518
@@ -38,16 +21,3 @@ def get_relay_biases_combinator() -> BiasesCombinator:
3821 default_combinator .add (RuleType .UNIFORM_RULE , UniformBias ())
3922
4023 return default_combinator
41-
42-
43- def get_relay_biases_combinator_v2 () -> BiasesCombinator :
44- default_combinator = OrderedBiasesCombinator ()
45-
46- default_combinator .add (RuleType .BOOST_KEY_TRANSACTIONS_RULE , BoostKeyTransactionsBiasV2 ())
47- default_combinator .add (RuleType .IGNORE_HEALTH_CHECKS_RULE , IgnoreHealthChecksBiasV2 ())
48-
49- default_combinator .add (RuleType .BOOST_ENVIRONMENTS_RULE , BoostEnvironmentsBiasV2 ())
50- default_combinator .add (RuleType .BOOST_LATEST_RELEASES_RULE , BoostLatestReleasesBiasV2 ())
51- default_combinator .add (RuleType .UNIFORM_RULE , UniformBiasV2 ())
52-
53- return default_combinator
0 commit comments