scout_apm_python icon indicating copy to clipboard operation
scout_apm_python copied to clipboard

Capture full URL in urllib3 spans

Open adamchainz opened this issue 5 years ago • 2 comments

Spotted whilst debugging a customer's traces.

adamchainz avatar Oct 06 '20 16:10 adamchainz

I think there's still a bug here where we sometimes capture the wrong hostname, due to a connection pool getting reused for different hosts. It seems requests does this as an optimization.

adamchainz avatar Oct 06 '20 17:10 adamchainz

I've dug into this and tried recreating it via requests and urllib3. I exceeded the pool size limits and increased the count to see if it was an odd bug exposed by repetition. I was unable to reproduce the bug. Looking at the code, I'm not sure how it would exist since we generate the absolute url from the wrapped connection instance.

If CI passes, I'm inclined to merge this.

tim-schilling avatar Apr 15 '21 13:04 tim-schilling