{"action":"created","issue":{"url":"https://api.github.com/repos/uber/tchannel-go/issues/426","repository_url":"https://api.github.com/repos/uber/tchannel-go","labels_url":"https://api.github.com/repos/uber/tchannel-go/issues/426/labels{/name}","comments_url":"https://api.github.com/repos/uber/tchannel-go/issues/426/comments","events_url":"https://api.github.com/repos/uber/tchannel-go/issues/426/events","html_url":"https://github.com/uber/tchannel-go/pull/426","id":162239994,"number":426,"title":"WIP - Integrate opentracing","user":{"login":"yurishkuro","id":3523016,"avatar_url":"https://avatars.githubusercontent.com/u/3523016?v=3","gravatar_id":"","url":"https://api.github.com/users/yurishkuro","html_url":"https://github.com/yurishkuro","followers_url":"https://api.github.com/users/yurishkuro/followers","following_url":"https://api.github.com/users/yurishkuro/following{/other_user}","gists_url":"https://api.github.com/users/yurishkuro/gists{/gist_id}","starred_url":"https://api.github.com/users/yurishkuro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurishkuro/subscriptions","organizations_url":"https://api.github.com/users/yurishkuro/orgs","repos_url":"https://api.github.com/users/yurishkuro/repos","events_url":"https://api.github.com/users/yurishkuro/events{/privacy}","received_events_url":"https://api.github.com/users/yurishkuro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-24T22:10:13Z","updated_at":"2016-06-27T18:53:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/uber/tchannel-go/pulls/426","html_url":"https://github.com/uber/tchannel-go/pull/426","diff_url":"https://github.com/uber/tchannel-go/pull/426.diff","patch_url":"https://github.com/uber/tchannel-go/pull/426.patch"},"body":"DO NOT MERGE, WIP\r\n\r\nChanges:\r\n* internal span reporting completely removed and replaced with OpenTracing\r\n* span context and baggage are propagated via application headers (json only atm, thrift next)\r\n* channel can be configured with `opentracing.Tracer`, otherwise it defaults to `opentracing.GlobalTracer()` (which is no-op by default)\r\n* outbound calls tracing\r\n  * span is started in `(c *Connection) beginCall`\r\n  * if tracer understands \"zipkin\" format, then the tracing fields are populated in `callReq`\r\n  * the actual span/baggage info is injected in `json/call.go`\r\n  * span is stored in `Response` and finished in a couple of places in `outbound.go`\r\n* inbound requests tracing\r\n  * span is started in `json/handler.go`\r\n  * finished generically in completion callbacks in `inbound.go`\r\n"},"comment":{"url":"https://api.github.com/repos/uber/tchannel-go/issues/comments/228840038","html_url":"https://github.com/uber/tchannel-go/pull/426#issuecomment-228840038","issue_url":"https://api.github.com/repos/uber/tchannel-go/issues/426","id":228840038,"user":{"login":"prashantv","id":140159,"avatar_url":"https://avatars.githubusercontent.com/u/140159?v=3","gravatar_id":"","url":"https://api.github.com/users/prashantv","html_url":"https://github.com/prashantv","followers_url":"https://api.github.com/users/prashantv/followers","following_url":"https://api.github.com/users/prashantv/following{/other_user}","gists_url":"https://api.github.com/users/prashantv/gists{/gist_id}","starred_url":"https://api.github.com/users/prashantv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashantv/subscriptions","organizations_url":"https://api.github.com/users/prashantv/orgs","repos_url":"https://api.github.com/users/prashantv/repos","events_url":"https://api.github.com/users/prashantv/events{/privacy}","received_events_url":"https://api.github.com/users/prashantv/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T18:53:05Z","updated_at":"2016-06-27T18:53:05Z","body":"@yurishkuro Looking over the changes now, some high level feedback:\r\n- I think `inbound.go` should initially create the span and set the span in the context. I think the subpackages are responsible for possibly adding baggage to the span from the headers.\r\n- Spans seem like they are mutable, does this mean that anyone who accesses the context could modify tags/baggage?\r\n- It seems like the `tracingDisabled` bit uses `Flags` in opentracing, but I don't see anything about Flags in the opentracing godoc, https://godoc.org/github.com/opentracing/opentracing-go#Span\r\n\r\nI think the outbound side looks good, just a little unsure about inbound. If the TChannel library is used without any of the `json` or `thrift` packages, will the context still be created with the opentracing span and be propagated correctly? I would expect everything except tags/baggage to work in that case."}}
{"actor":{"display_login":"prashantv"}}