Skip to content

Commit a7911f7

Browse files
authored
Merge pull request #766 from aws-otel/samplerDocFix
Updated X-Ray sampler documentation
2 parents 1d0abf8 + 59df522 commit a7911f7

File tree

4 files changed

+46
-9
lines changed

4 files changed

+46
-9
lines changed

src/docs/getting-started/dotnet-sdk/auto-instr.mdx

+9-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,16 @@ You can use CloudWatch Application Signals to automatically instrument your appl
7171

7272
The ADOT .NET Auto-Instrumentation can be configured to use [X-Ray remote sampling](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-sampling.html)
7373
by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to [configure the OpenTelemetry collector](/docs/getting-started/remote-sampling)
74-
to allow the application to fetch sampling configuration. By default the sampler sends requests to `http://localhost:2000`. By setting `OTEL_TRACES_SAMPLER_ARG`
74+
to allow the application to fetch sampling configuration.
75+
76+
You can further configure the Sampler by setting the `OTEL_TRACES_SAMPLER_ARG` environment variable. You can update the endpoint and the polling rate as follows:
77+
```
78+
OTEL_TRACES_SAMPLER_ARG=endpoint=<ENDPOINT>,polling_interval=<INTERVAL_IN_SECS>
79+
```
80+
81+
By default the sampler sends requests to `http://localhost:2000` and has a polling rate of `300 seconds`. By setting `OTEL_TRACES_SAMPLER_ARG`
7582
environment variable you can change the endpoint the sampler talks with when getting sampling configuration from AWS X-Ray Console. For example setting
76-
`OTEL_TRACES_SAMPLER_ARG=endpoint=http://localhost:4000` would configure the sampler to communicate with `http://localhost:4000`.
83+
`OTEL_TRACES_SAMPLER_ARG=endpoint=http://localhost:4000,polling_interval=60` would configure the sampler to communicate with `http://localhost:4000` and poll the sampling rules every `60 seconds`.
7784

7885
## Using Manual Instrumentation
7986

src/docs/getting-started/java-sdk/auto-instr.mdx

+11-3
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,19 @@ You can use CloudWatch Application Signals to automatically instrument your appl
8585

8686
### Using X-Ray Remote Sampling
8787

88-
The ADOT Java Auto-Instrumentation Agent can be configured to use [X-Ray remote sampling](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-sampling.html)
88+
The ADOT Java Auto-Instrumentation can be configured to use [X-Ray remote sampling](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-sampling.html)
8989
by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to [configure the OpenTelemetry collector](/docs/getting-started/remote-sampling)
90-
to allow the application to fetch sampling configuration. By default the sampler sends requests to `http://localhost:2000`. By setting `OTEL_TRACES_SAMPLER_ARG`
90+
to allow the application to fetch sampling configuration.
91+
92+
You can further configure the Sampler by setting the `OTEL_TRACES_SAMPLER_ARG` environment variable. You can update the endpoint and the polling rate as follows:
93+
```
94+
OTEL_TRACES_SAMPLER_ARG=endpoint=<ENDPOINT>,polling_interval=<INTERVAL_IN_SECS>
95+
```
96+
97+
By default the sampler sends requests to `http://localhost:2000` and has a polling rate of `300 seconds`. By setting `OTEL_TRACES_SAMPLER_ARG`
9198
environment variable you can change the endpoint the sampler talks with when getting sampling configuration from AWS X-Ray Console. For example setting
92-
`OTEL_TRACES_SAMPLER_ARG=endpoint=http://localhost:4000` would configure the sampler to communicate with `http://localhost:4000`.
99+
`OTEL_TRACES_SAMPLER_ARG=endpoint=http://localhost:4000,polling_interval=60` would configure the sampler to communicate with `http://localhost:4000` and poll the sampling rules every `60 seconds`.
100+
93101
### Running the agent in Docker
94102

95103
If your application is packaged in Docker, the easiest way to run with the agent is to use the

src/docs/getting-started/js-sdk/trace-metric-auto-instr.mdx

+13-2
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,20 @@ You can use CloudWatch Application Signals to automatically instrument your Node
7070

7171
[Get started with CloudWatch Application Signals](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Application-Monitoring-Sections.html)
7272

73-
### Using AWS X-Ray Remote Sampling
73+
### Using X-Ray Remote Sampling
7474

75-
The ADOT JavaScript auto-instrumentation can be configured to use AWS X-Ray remote sampling by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to configure the OpenTelemetry collector to allow the application to fetch sampling configuration. By default the sampler sends requests to `http://localhost:2000`. By setting `OTEL_TRACES_SAMPLER_ARG` environment variable, you can change the endpoint the sampler talks with when getting sampling configuration from AWS X-Ray Console. For example setting `OTEL_TRACES_SAMPLER_ARG=endpoint=http://localhost:4000` would configure the sampler to communicate with `http://localhost:4000`.
75+
The ADOT JavaScript Auto-Instrumentation can be configured to use [X-Ray remote sampling](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-sampling.html)
76+
by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to [configure the OpenTelemetry collector](/docs/getting-started/remote-sampling)
77+
to allow the application to fetch sampling configuration.
78+
79+
You can further configure the Sampler by setting the `OTEL_TRACES_SAMPLER_ARG` environment variable. You can update the endpoint and the polling rate as follows:
80+
```
81+
OTEL_TRACES_SAMPLER_ARG=endpoint=<ENDPOINT>,polling_interval=<INTERVAL_IN_SECS>
82+
```
83+
84+
By default the sampler sends requests to `http://localhost:2000` and has a polling rate of `300 seconds`. By setting `OTEL_TRACES_SAMPLER_ARG`
85+
environment variable you can change the endpoint the sampler talks with when getting sampling configuration from AWS X-Ray Console. For example setting
86+
`OTEL_TRACES_SAMPLER_ARG=endpoint=http://localhost:4000,polling_interval=60` would configure the sampler to communicate with `http://localhost:4000` and poll the sampling rules every `60 seconds`.
7687

7788
<SectionSeparator />
7889

src/docs/getting-started/python-sdk/auto-instr.mdx

+13-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,20 @@ You can use CloudWatch Application Signals to automatically instrument your appl
6767

6868
[Get started with CloudWatch Application Signals](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Application-Monitoring-Sections.html)
6969

70-
### Using AWS X-Ray Remote Sampling
70+
### Using X-Ray Remote Sampling
7171

72-
The ADOT Python auto-instrumentation can be configured to use AWS X-Ray remote sampling by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to configure the OpenTelemetry collector to allow the application to fetch sampling configuration. By default the sampler sends requests to `http://localhost:2000`. By setting `OTEL_TRACES_SAMPLER_ARG` environment variable, you can change the endpoint the sampler talks with when getting sampling configuration from AWS X-Ray Console. For example setting `OTEL_TRACES_SAMPLER_ARG=endpoint=http://localhost:4000` would configure the sampler to communicate with `http://localhost:4000`.
72+
The ADOT Python Auto-Instrumentation can be configured to use [X-Ray remote sampling](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-sampling.html)
73+
by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to [configure the OpenTelemetry collector](/docs/getting-started/remote-sampling)
74+
to allow the application to fetch sampling configuration.
75+
76+
You can further configure the Sampler by setting the `OTEL_TRACES_SAMPLER_ARG` environment variable. You can update the endpoint and the polling rate as follows:
77+
```
78+
OTEL_TRACES_SAMPLER_ARG=endpoint=<ENDPOINT>,polling_interval=<INTERVAL_IN_SECS>
79+
```
80+
81+
By default the sampler sends requests to `http://localhost:2000` and has a polling rate of `300 seconds`. By setting `OTEL_TRACES_SAMPLER_ARG`
82+
environment variable you can change the endpoint the sampler talks with when getting sampling configuration from AWS X-Ray Console. For example setting
83+
`OTEL_TRACES_SAMPLER_ARG=endpoint=http://localhost:4000,polling_interval=60` would configure the sampler to communicate with `http://localhost:4000` and poll the sampling rules every `60 seconds`.
7384

7485
<SectionSeparator />
7586

0 commit comments

Comments
 (0)