Skip to content

Commit

Permalink
Fix an issue in conflict global tracer_provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ADOT Patch workflow committed Feb 6, 2024
1 parent ae7a2b9 commit 786d8a1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def setUp(self):
sampler=None,
resource=None,
)
set_tracer_provider(self.provider)
self.provider.add_span_processor(self.processor)
self.tracer: Tracer = self.provider.get_tracer("awsxray")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,9 @@ def test_provide_generate_xray_ids(self):
self.assertGreater(trace_id, start_time_sec)

def test_trace_id_ratio_sampler(self):
print(os.environ.get(OTEL_TRACES_SAMPLER))
print("KKKKKKKKKKKKKKK" + os.environ.get(OTEL_TRACES_SAMPLER_ARG))
num_spans: int = 10000
num_sampled: int = 0
tracer: Tracer = self.tracer_provider.get_tracer("test")
print(self.tracer_provider.sampler.get_description() + "BBBBBBBBBBB")
for i in range(num_spans):
span: Span = tracer.start_span("test")
if span.get_span_context().trace_flags.sampled:
Expand Down

This file was deleted.

0 comments on commit 786d8a1

Please sign in to comment.