Skip to content

Commit 4bea199

Browse files
committed
improve doc about sampling configuration
1 parent 186beda commit 4bea199

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/configurations.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ 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+
from aws_xray_sdk.core.sampling.local.sampler import LocalSampler
28+
xray_recorder.configure(sampler=LocalSampler())
29+
2630
The following code is an example of a rule configuration::
2731

2832
{

0 commit comments

Comments
 (0)