Skip to content

Commit b544863

Browse files
committed
Updated the versions
1 parent 381ce2b commit b544863

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

instrumentation/opentelemetry-instrumentation-threading/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ classifiers = [
2626
]
2727
dependencies = [
2828
"opentelemetry-api ~= 1.12",
29-
"opentelemetry-instrumentation == 0.37b0.dev",
29+
"opentelemetry-instrumentation == 0.38b0.dev",
3030
]
3131

3232
[project.optional-dependencies]
3333
instruments = []
3434
test = [
3535
"opentelemetry-instrumentation-threading[instruments]",
36-
"opentelemetry-test-utils == 0.37b0.dev",
36+
"opentelemetry-test-utils == 0.38b0.dev",
3737
]
3838

3939
[project.entry-points.opentelemetry_instrumentor]

instrumentation/opentelemetry-instrumentation-threading/tests/test_threading.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,28 @@ def print_cube(self, num):
4343

4444
def print_square_with_thread(self, num):
4545
with self.tracer.start_as_current_span("square"):
46-
t2 = threading.Thread(target=self.print_cube, args=(10,))
46+
cube_thread = threading.Thread(target=self.print_cube, args=(10,))
4747
print("Square: {}" .format(num * num))
48-
t2.start()
49-
t2.join()
48+
cube_thread.start()
49+
cube_thread.join()
5050

5151
def calculate(self, num):
5252
with self.tracer.start_as_current_span("calculate"):
53-
t1 = threading.Thread(target=self.print_square, args=(num,))
54-
t2 = threading.Thread(target=self.print_cube, args=(num,))
55-
t1.start()
56-
t1.join()
53+
square_thread = threading.Thread(target=self.print_square, args=(num,))
54+
cube_thread = threading.Thread(target=self.print_cube, args=(num,))
55+
square_thread.start()
56+
square_thread.join()
5757

58-
t2.start()
59-
t2.join()
58+
cube_thread.start()
59+
cube_thread.join()
6060

6161

6262
def test_without_thread_nesting(self):
63-
t1 = threading.Thread(target=self.print_square, args=(10,))
63+
square_thread = threading.Thread(target=self.print_square, args=(10,))
6464

6565
with self.tracer.start_as_current_span("root"):
66-
t1.start()
67-
t1.join()
66+
square_thread.start()
67+
square_thread.join()
6868

6969
spans = self.memory_exporter.get_finished_spans()
7070
self.assertEqual(len(spans), 2)
@@ -75,12 +75,12 @@ def test_without_thread_nesting(self):
7575
self.assertIsNone(root.parent)
7676

7777
def test_with_thread_nesting(self):
78-
t1 = threading.Thread(target=self.print_square_with_thread, args=(10,))
78+
square_thread = threading.Thread(target=self.print_square_with_thread, args=(10,))
7979

8080

8181
with self.tracer.start_as_current_span("root"):
82-
t1.start()
83-
t1.join()
82+
square_thread.start()
83+
square_thread.join()
8484

8585
spans = self.memory_exporter.get_finished_spans()
8686

@@ -93,11 +93,11 @@ def test_with_thread_nesting(self):
9393
self.assertIsNone(root.parent)
9494

9595
def test_with_thread_multi_nesting(self):
96-
t1 = threading.Thread(target=self.calculate, args=(10,))
96+
calculate_thread = threading.Thread(target=self.calculate, args=(10,))
9797

9898
with self.tracer.start_as_current_span("root"):
99-
t1.start()
100-
t1.join()
99+
calculate_thread.start()
100+
calculate_thread.join()
101101

102102
spans = self.memory_exporter.get_finished_spans()
103103

@@ -113,9 +113,9 @@ def test_with_thread_multi_nesting(self):
113113
def test_uninstrumented(self):
114114
ThreadingInstrumentor().uninstrument()
115115

116-
t1 = threading.Thread(target=self.print_square, args=(10,))
117-
t1.start()
118-
t1.join()
116+
square_thread = threading.Thread(target=self.print_square, args=(10,))
117+
square_thread.start()
118+
square_thread.join()
119119
spans = self.memory_exporter.get_finished_spans()
120120
self.assertEqual(len(spans), 1)
121121

0 commit comments

Comments
 (0)