Trace sampling rate - Amazon CloudWatch

Trace sampling rate

By default, when you enable Application Signals X-Ray centralized sampling is enabled using the default sampling rate settings of reservoir=1/s and fixed_rate=5%. The environment variables for the AWS Distro for OpenTelemetry (ADOT) SDK agent as set as follows.

Environment variable Value Note

OTEL_TRACES_SAMPLER

xray

OTEL_TRACES_SAMPLER_ARG

endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000

Endpoint of the CloudWatch agent

For information about changing the sampling configuration, see the following:

If you want to disable X-Ray centralized sampling and use local sampling instead, set the following values for the ADOT SDK Java agent as below. The following example sets the sampling rate at 5%.

Environment variable Value

OTEL_TRACES_SAMPLER

parentbased_traceidratio

OTEL_TRACES_SAMPLER_ARG

0.05

For information about more advanced sampling settings, see OTEL_TRACES_SAMPLER.