{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/14203","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/14203/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/14203/comments","events_url":"https://api.github.com/repos/golang/go/issues/14203/events","html_url":"https://github.com/golang/go/issues/14203","id":130845875,"number":14203,"title":"Tracing callstack of a method from Go's standard library","user":{"login":"jingweno","id":169064,"avatar_url":"https://avatars.githubusercontent.com/u/169064?v=3","gravatar_id":"","url":"https://api.github.com/users/jingweno","html_url":"https://github.com/jingweno","followers_url":"https://api.github.com/users/jingweno/followers","following_url":"https://api.github.com/users/jingweno/following{/other_user}","gists_url":"https://api.github.com/users/jingweno/gists{/gist_id}","starred_url":"https://api.github.com/users/jingweno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingweno/subscriptions","organizations_url":"https://api.github.com/users/jingweno/orgs","repos_url":"https://api.github.com/users/jingweno/repos","events_url":"https://api.github.com/users/jingweno/events{/privacy}","received_events_url":"https://api.github.com/users/jingweno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-02T22:53:50Z","updated_at":"2016-02-02T23:26:46Z","closed_at":null,"body":"**What version of Go are you using (go version)?**\r\n\r\n1.5.3.\r\n\r\n**What operating system and processor architecture are you using?**\r\n\r\nLinux. AMD 64.\r\n\r\n**What did you do?**\r\n\r\nI'm using `httputil.ReverseProxy` to proxy to a host behind ELB, and I'm getting the errors \"http: proxy error: net/http: request canceled\" & \"http: proxy error: net/http: transport closed before response was received\" occationally. The line that printed the error is [here](https://github.com/golang/go/blob/release-branch.go1.5/src/net/http/httputil/reverseproxy.go#L196). And the error came from [`http.Transport.RoundTrip`](https://github.com/golang/go/blob/release-branch.go1.5/src/net/http/httputil/reverseproxy.go#L194).\r\n\r\nAfter more digging, [the errors](https://github.com/golang/go/blob/release-branch.go1.5/src/net/http/transport.go#L1093-L1094) could come from a couple places in `http.Transport.RoundTrip`. I was trying to find a way to print the callstacks of the error from `http.Transport.RoundTrip` to understand why it was returned but there's currently no way to do so.\r\n\r\nDetails can be found in [this golang-nuts thread](https://groups.google.com/forum/#!topic/golang-nuts/apVfiayC01I).\r\n\r\n**What did you expect to see?**\r\n\r\nI would expect I could instrument a method of either application code or Go's standard library and find out the callstacks at runtime.\r\n\r\n**What did you see instead?**\r\n\r\nNo way to find out the callstack of a method from Go's stdlib. This is a feature request."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/178884024","html_url":"https://github.com/golang/go/issues/14203#issuecomment-178884024","issue_url":"https://api.github.com/repos/golang/go/issues/14203","id":178884024,"user":{"login":"jingweno","id":169064,"avatar_url":"https://avatars.githubusercontent.com/u/169064?v=3","gravatar_id":"","url":"https://api.github.com/users/jingweno","html_url":"https://github.com/jingweno","followers_url":"https://api.github.com/users/jingweno/followers","following_url":"https://api.github.com/users/jingweno/following{/other_user}","gists_url":"https://api.github.com/users/jingweno/gists{/gist_id}","starred_url":"https://api.github.com/users/jingweno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingweno/subscriptions","organizations_url":"https://api.github.com/users/jingweno/orgs","repos_url":"https://api.github.com/users/jingweno/repos","events_url":"https://api.github.com/users/jingweno/events{/privacy}","received_events_url":"https://api.github.com/users/jingweno/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T23:26:46Z","updated_at":"2016-02-02T23:26:46Z","body":"> http.RoundTripper passes stuff between goroutines. A single stack trace won't yield the answers you seek.\r\n\r\nI may not fully understand how goroutines work. But it's a matter of traceability, right? Can we not trace the calls from one goroutine to another?"}}