Skip to content

Commit dd7e987

Browse files
authored
fix: disable batching of X-Ray subsegments (#284)
1 parent 2591050 commit dd7e987

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

aws_lambda_powertools/tracing/tracer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
is_cold_start = True
1616
logger = logging.getLogger(__name__)
17+
# Set the streaming threshold to 0 on the default recorder to force sending
18+
# subsegments individually, rather than batching them.
19+
# See https://github.com/awslabs/aws-lambda-powertools-python/issues/283
20+
aws_xray_sdk.core.xray_recorder.configure(streaming_threshold=0)
1721

1822

1923
class Tracer:

0 commit comments

Comments
 (0)