Skip to content
New issue

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

Client DNS start/end events not fired #2841

Closed
MykolaPolovyi opened this issue Mar 16, 2018 · 6 comments
Closed

Client DNS start/end events not fired #2841

MykolaPolovyi opened this issue Mar 16, 2018 · 6 comments

Comments

@MykolaPolovyi
Copy link

Long story short

Unable to track dns timing via TraceConfig using client with TcpConnector, since None intead of traces arg passed to direct and proxy connections methods

    async def _create_connection(self, req, traces=None):
        """Create connection.

        Has same keyword arguments as BaseEventLoop.create_connection.
        """
        if req.proxy:
            _, proto = await self._create_proxy_connection(
                req,
                traces=None
            )
        else:
            _, proto = await self._create_direct_connection(
                req,
                traces=None
            )

        return proto

Expected behaviour

working DNS tracing with TCP

Actual behaviour

dns events missed

Your environment

aiohttp: 3.0.9
OS X

@asvetlov
Copy link
Member

That's sad but the fix looks easy.
Would you provide a patch?

@MykolaPolovyi
Copy link
Author

yes

@pfreixes
Copy link
Contributor

shame of me, the integration test that wires all of the tracing does not cover this signal [1] ... if its not a big deal would be nice if we can add these signals to that test. That would help in the future to avoid the same mistake.

[1] https://github.com/aio-libs/aiohttp/blob/master/tests/test_web_functional.py#L1641

@MykolaPolovyi
Copy link
Author

Thanks for pointing the test. I actually wrote a different one and seems like in a wrong place. Will do there.

@pfreixes
Copy link
Contributor

Well this just checks the happy path an upper level, if you have others at function level please commit them as well!

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants