Skip to content

Commit

Permalink
Merge pull request #766 from aws-otel/samplerDocFix
Browse files Browse the repository at this point in the history
Updated X-Ray sampler documentation
  • Loading branch information
vasireddy99 authored Jan 14, 2025
2 parents 1d0abf8 + 59df522 commit a7911f7
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 9 deletions.
11 changes: 9 additions & 2 deletions src/docs/getting-started/dotnet-sdk/auto-instr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,16 @@ You can use CloudWatch Application Signals to automatically instrument your appl

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)
by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to [configure the OpenTelemetry collector](/docs/getting-started/remote-sampling)
to allow the application to fetch sampling configuration. By default the sampler sends requests to `http://localhost:2000`. By setting `OTEL_TRACES_SAMPLER_ARG`
to allow the application to fetch sampling configuration.

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:
```
OTEL_TRACES_SAMPLER_ARG=endpoint=<ENDPOINT>,polling_interval=<INTERVAL_IN_SECS>
```

By default the sampler sends requests to `http://localhost:2000` and has a polling rate of `300 seconds`. 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`.
`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`.

## Using Manual Instrumentation

Expand Down
14 changes: 11 additions & 3 deletions src/docs/getting-started/java-sdk/auto-instr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,19 @@ You can use CloudWatch Application Signals to automatically instrument your appl

### Using X-Ray Remote Sampling

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)
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)
by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to [configure the OpenTelemetry collector](/docs/getting-started/remote-sampling)
to allow the application to fetch sampling configuration. By default the sampler sends requests to `http://localhost:2000`. By setting `OTEL_TRACES_SAMPLER_ARG`
to allow the application to fetch sampling configuration.

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:
```
OTEL_TRACES_SAMPLER_ARG=endpoint=<ENDPOINT>,polling_interval=<INTERVAL_IN_SECS>
```

By default the sampler sends requests to `http://localhost:2000` and has a polling rate of `300 seconds`. 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`.
`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`.

### Running the agent in Docker

If your application is packaged in Docker, the easiest way to run with the agent is to use the
Expand Down
15 changes: 13 additions & 2 deletions src/docs/getting-started/js-sdk/trace-metric-auto-instr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,20 @@ You can use CloudWatch Application Signals to automatically instrument your Node

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

### Using AWS X-Ray Remote Sampling
### Using X-Ray Remote Sampling

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`.
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)
by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to [configure the OpenTelemetry collector](/docs/getting-started/remote-sampling)
to allow the application to fetch sampling configuration.

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:
```
OTEL_TRACES_SAMPLER_ARG=endpoint=<ENDPOINT>,polling_interval=<INTERVAL_IN_SECS>
```

By default the sampler sends requests to `http://localhost:2000` and has a polling rate of `300 seconds`. 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,polling_interval=60` would configure the sampler to communicate with `http://localhost:4000` and poll the sampling rules every `60 seconds`.

<SectionSeparator />

Expand Down
15 changes: 13 additions & 2 deletions src/docs/getting-started/python-sdk/auto-instr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,20 @@ You can use CloudWatch Application Signals to automatically instrument your appl

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

### Using AWS X-Ray Remote Sampling
### Using X-Ray Remote Sampling

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`.
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)
by setting the environment variable `OTEL_TRACES_SAMPLER=xray`. You will also need to [configure the OpenTelemetry collector](/docs/getting-started/remote-sampling)
to allow the application to fetch sampling configuration.

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:
```
OTEL_TRACES_SAMPLER_ARG=endpoint=<ENDPOINT>,polling_interval=<INTERVAL_IN_SECS>
```

By default the sampler sends requests to `http://localhost:2000` and has a polling rate of `300 seconds`. 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,polling_interval=60` would configure the sampler to communicate with `http://localhost:4000` and poll the sampling rules every `60 seconds`.

<SectionSeparator />

Expand Down

0 comments on commit a7911f7

Please sign in to comment.