Skip to content

Commit 5f7bd4b

Browse files
committed
include feedback
1 parent b9a303d commit 5f7bd4b

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class AsyncioInstrumentor(BaseInstrumentor):
119119
def __init__(self):
120120
super().__init__()
121121
self.process_duration_histogram = None
122-
self.process_counts_counter = None
122+
self.process_created_counter = None
123123

124124
self._tracer = None
125125
self._meter = None
@@ -147,8 +147,8 @@ def _instrument(self, **kwargs):
147147
description="Duration of asyncio process",
148148
unit="s",
149149
)
150-
self.process_counts_counter = self._meter.create_counter(
151-
name="asyncio.process.count",
150+
self.process_created_counter = self._meter.create_counter(
151+
name="asyncio.process.created",
152152
description="Number of asyncio process",
153153
unit="{process}",
154154
)
@@ -331,7 +331,7 @@ def record_process(
331331
"""
332332
duration = max(default_timer() - start, 0)
333333
self.process_duration_histogram.record(duration, attr)
334-
self.process_counts_counter.add(1, attr)
334+
self.process_created_counter.add(1, attr)
335335

336336
if span:
337337
if span.is_recording() and exception:

instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
import os
15+
from typing import Set
1516

1617
# pylint: disable=no-name-in-module
1718
from opentelemetry.instrumentation.asyncio.environment_variables import (

instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_cancellation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_cancel(self):
6666
point.attributes["name"],
6767
["cancellation_coro", "cancellable_coroutine"],
6868
)
69-
if metric.name == "asyncio.process.count":
69+
if metric.name == "asyncio.process.created":
7070
for point in metric.data.data_points:
7171
self.assertEqual(point.attributes["type"], "coroutine")
7272
self.assertIn(

instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_ensure_future.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async def test():
8585
if metric.name == "asyncio.process.duration":
8686
for point in metric.data.data_points:
8787
self.assertEqual(point.attributes["type"], "future")
88-
if metric.name == "asyncio.process.count":
88+
if metric.name == "asyncio.process.created":
8989
for point in metric.data.data_points:
9090
self.assertEqual(point.attributes["type"], "future")
9191
self.assertEqual(point.attributes["state"], "finished")

instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_to_thread.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async def to_thread():
6767
for point in metric.data.data_points:
6868
self.assertEqual(point.attributes["type"], "to_thread")
6969
self.assertEqual(point.attributes["name"], "multiply")
70-
if metric.name == "asyncio.process.count":
70+
if metric.name == "asyncio.process.created":
7171
for point in metric.data.data_points:
7272
self.assertEqual(point.attributes["type"], "to_thread")
7373
self.assertEqual(point.attributes["name"], "multiply")

0 commit comments

Comments
 (0)