We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe your environment
httpx==0.18.2
opentelemetry-instrumentation-httpx==0.30b1
opentelemetry-api==1.11.1
opentelemetry-instrumentation==0.30b1
opentelemetry-semantic-conventions==0.30b1
wrapt==1.14.1
Deprecated==1.2.13
pytest==7.1.2
Steps to reproduce
# test_instrumentation.py import httpx from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor ATTEMPTS = 10 def test_httpx_instrumentor() -> None: HTTPXClientInstrumentor().instrument() for _ in range(ATTEMPTS): with httpx.Client() as client: client.get("https://example.com") HTTPXClientInstrumentor().uninstrument()
$ pytest -W error test_instrumentation.py
What is the expected behavior? Command successfully completes.
What is the actual behavior?
E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <ssl.SSLSocket fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6> E E Traceback (most recent call last): E File "<...>/venv/lib/python3.9/site-packages/httpcore/_sync/connection.py", line 163, in _open_socket E return self._backend.open_tcp_stream( E ResourceWarning: unclosed <ssl.SSLSocket fd=18, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.0.102', 49992), raddr=('93.184.216.34', 443)>
Additional context
ATTEMPTS = 1
ATTEMPTS = 2..9
ATTEMPTS = 9+
httpx.AsyncClient()
The text was updated successfully, but these errors were encountered:
Hi there,
I also notice this issue and never really saw it in the past so I'm wondering if anything could have changed.
Sorry, something went wrong.
Might this have been addressed by #1695?
I believe so, @Tayum, can you please bump the version and verify?
Hey @srikanthccv,
With the environment of:
opentelemetry-instrumentation-httpx==0.38b0
I can confirm that: $ pytest -W error test_instrumentation.py
Command successfully completes 🎉
Although please note, that with
The command: $ pytest -W error test_instrumentation.py
Gives:
test_instrumentation.py:3: in <module> from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor ../venvs/sample/lib/python3.10/site-packages/opentelemetry/instrumentation/httpx/__init__.py:172: in <module> from opentelemetry.instrumentation.instrumentor import BaseInstrumentor ../venvs/sample/lib/python3.10/site-packages/opentelemetry/instrumentation/instrumentor.py:24: in <module> from opentelemetry.instrumentation.dependencies import ( ../venvs/sample/lib/python3.10/site-packages/opentelemetry/instrumentation/dependencies.py:4: in <module> from pkg_resources import ( ../venvs/sample/lib/python3.10/site-packages/pkg_resources/__init__.py:121: in <module> warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning) E DeprecationWarning: pkg_resources is deprecated as an API
With: $ pytest -W error -W ignore::DeprecationWarning:pkg_resources test_instrumentation.py
$ pytest -W error -W ignore::DeprecationWarning:pkg_resources test_instrumentation.py
though command completes successfully as well.
So I can confirm original problem of the issue is solved. Thanks!
No branches or pull requests
Describe your environment
httpx==0.18.2
opentelemetry-instrumentation-httpx==0.30b1
opentelemetry-api==1.11.1
opentelemetry-instrumentation==0.30b1
opentelemetry-semantic-conventions==0.30b1
wrapt==1.14.1
Deprecated==1.2.13
pytest==7.1.2
Steps to reproduce
What is the expected behavior?
Command successfully completes.
What is the actual behavior?
Additional context
ATTEMPTS = 1
, somewhen reproducible withATTEMPTS = 2..9
and highly reproducible withATTEMPTS = 9+
;httpx.AsyncClient()
is used.The text was updated successfully, but these errors were encountered: