Skip to content

Commit be1d26d

Browse files
committed
address comments
1 parent 1917bbf commit be1d26d

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

sdk-extension/opentelemetry-sdk-extension-aws/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ detector.
7676

7777

7878
Usage (AWS X-Ray Remote Sampler)
79-
----------------------------
79+
--------------------------------
8080

8181

8282
Use the provided AWS X-Ray Remote Sampler by setting this sampler in your instrumented application:

sdk-extension/opentelemetry-sdk-extension-aws/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies = [
3030
"opentelemetry-sdk ~= 1.23",
3131
"opentelemetry-instrumentation ~= 0.44b0",
3232
"opentelemetry-semantic-conventions ~= 0.44b0",
33+
"requests ~= 2.28",
3334
]
3435

3536
[project.entry-points.opentelemetry_id_generator]

sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/trace/sampler/aws_xray_remote_sampler.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
DEFAULT_RULES_POLLING_INTERVAL_SECONDS = 300
4747

4848

49+
# WORK IN PROGRESS
50+
#
4951
# Wrapper class to ensure that all XRay Sampler Functionality in _AwsXRayRemoteSampler
5052
# uses ParentBased logic to respect the parent span's sampling decision
5153
class AwsXRayRemoteSampler(Sampler):
@@ -65,7 +67,6 @@ def __init__(
6567
)
6668
)
6769

68-
# pylint: disable=no-self-use
6970
@override
7071
def should_sample(
7172
self,
@@ -93,6 +94,8 @@ def get_description(self) -> str:
9394
return f"AwsXRayRemoteSampler{{root:{self._root.get_description()}}}"
9495

9596

97+
# WORK IN PROGRESS
98+
#
9699
# _AwsXRayRemoteSampler contains all core XRay Sampler Functionality,
97100
# however it is NOT Parent-based (e.g. Sample logic runs for each span)
98101
# Not intended for external use, use Parent-based `AwsXRayRemoteSampler` instead.
@@ -195,24 +198,7 @@ def __start_sampling_rule_poller(self) -> None:
195198
self._rules_timer.start()
196199

197200
def __generate_client_id(self) -> str:
198-
hex_chars = [
199-
"0",
200-
"1",
201-
"2",
202-
"3",
203-
"4",
204-
"5",
205-
"6",
206-
"7",
207-
"8",
208-
"9",
209-
"a",
210-
"b",
211-
"c",
212-
"d",
213-
"e",
214-
"f",
215-
]
201+
hex_chars = "0123456789abcdef"
216202
client_id_array: list[str] = []
217203
for _ in range(0, 24):
218204
client_id_array.append(random.choice(hex_chars))

0 commit comments

Comments
 (0)