Skip to content

Commit

Permalink
opentelemetry-instrumentation-aiohttp-client: stop using pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx committed Sep 13, 2024
1 parent 75ec37a commit 4026bb2
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import aiohttp.test_utils
import yarl
from http_server_mock import HttpServerMock
from pkg_resources import iter_entry_points

from opentelemetry import trace as trace_api
from opentelemetry.instrumentation import aiohttp_client
Expand All @@ -47,6 +46,7 @@
from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.test.test_base import TestBase
from opentelemetry.trace import Span, StatusCode
from opentelemetry.util._importlib_metadata import entry_points


def run_with_test_server(
Expand Down Expand Up @@ -886,9 +886,7 @@ def response_hook(

class TestLoadingAioHttpInstrumentor(unittest.TestCase):
def test_loading_instrumentor(self):
entry_points = iter_entry_points(
"opentelemetry_instrumentor", "aiohttp-client"
)
eps = entry_points("opentelemetry_instrumentor", "aiohttp-client")

instrumentor = next(entry_points).load()()
instrumentor = next(eps).load()()
self.assertIsInstance(instrumentor, AioHttpClientInstrumentor)

0 comments on commit 4026bb2

Please sign in to comment.