Skip to content

Commit d9fec7d

Browse files
authored
improve doc about sampling configuration (#406)
1 parent 2976b25 commit d9fec7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/configurations.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@ To turn off sampling, use code like the following::
1616
from aws_xray_sdk.core import xray_recorder
1717
xray_recorder.configure(sampling=False)
1818

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::
2020

2121
xray_recorder.configure(sampling_rules=your_rules)
2222

2323
The input can either be an absolute path to your sampling rule
2424
*.json* file or a dictionary.
2525

26+
To use only local rules for sampling, configure the recorder with a ``LocalSampler``::
27+
28+
from aws_xray_sdk.core.sampling.local.sampler import LocalSampler
29+
xray_recorder.configure(sampler=LocalSampler())
30+
2631
The following code is an example of a rule configuration::
2732

2833
{

0 commit comments

Comments
 (0)