File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,17 @@ To turn off sampling, use code like the following::
16
16
from aws_xray_sdk.core import xray_recorder
17
17
xray_recorder.configure(sampling=False)
18
18
19
- You can also configure the sampling rules::
19
+ By default, the SDK uses sampling rules configured in your AWS account. You can also configure the backup sampling rules locally ::
20
20
21
21
xray_recorder.configure(sampling_rules=your_rules)
22
22
23
23
The input can either be an absolute path to your sampling rule
24
24
*.json * file or a dictionary.
25
25
26
+ To use only local rules for sampling, configure the recorder with a ``LocalSampler ``.
27
+ from aws_xray_sdk.core.sampling.local.sampler import LocalSampler
28
+ xray_recorder.configure(sampler=LocalSampler())
29
+
26
30
The following code is an example of a rule configuration::
27
31
28
32
{
You can’t perform that action at this time.
0 commit comments