13.0 KB
golang-github-opentracing-contrib-go-stdlib version 1.0.0-1~jan+unchanged1 (unchanged) vs.
golang-github-opentracing-contrib-go-stdlib version 1.0.0+git20201217.1.08d136d-1~jan+nus1 (fresh-snapshots)
12.8 KB
golang-github-opentracing-contrib-go-stdlib-dev_1.0.0-1~jan+unchanged1_all.deb vs.
golang-github-opentracing-contrib-go-stdlib-dev_1.0.0+git20201217.1.08d136d-1~jan+nus1_all.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2021-01-08·08:12:54.000000·debian-binary1 -rw-r--r--···0········0········0········4·2021-01-08·08:12:54.000000·debian-binary
2 -rw-r--r--···0········0········0·····1000·2021-01-08·08:12:54.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1016·2021-01-08·08:12:54.000000·control.tar.xz
3 -rw-r--r--···0········0········0····11804·2021-01-08·08:12:54.000000·data.tar.xz3 -rw-r--r--···0········0········0····12240·2021-01-08·08:12:54.000000·data.tar.xz
1.18 KB
control.tar.xz
1.16 KB
control.tar
411 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./
2 -rw-r--r--···0·root·········(0)·root·········(0)······883·2021-01-08·08:12:54.000000·./control2 -rw-r--r--···0·root·········(0)·root·········(0)······899·2021-01-08·08:12:54.000000·./control
3 -rw-r--r--···0·root·········(0)·root·········(0)·····1132·2021-01-08·08:12:54.000000·./md5sums3 -rw-r--r--···0·root·········(0)·root·········(0)·····1132·2021-01-08·08:12:54.000000·./md5sums
703 B
./control
    
Offset 1, 13 lines modifiedOffset 1, 13 lines modified
1 Package:·golang-github-opentracing-contrib-go-stdlib-dev1 Package:·golang-github-opentracing-contrib-go-stdlib-dev
2 Source:·golang-github-opentracing-contrib-go-stdlib2 Source:·golang-github-opentracing-contrib-go-stdlib
3 Version:·1.0.0-1~jan+unchanged13 Version:·1.0.0+git20201217.1.08d136d-1~jan+nus1
4 Architecture:·all4 Architecture:·all
5 Maintainer:·Debian·Go·Packaging·Team·<team+pkg-go@tracker.debian.org>5 Maintainer:·Debian·Go·Packaging·Team·<team+pkg-go@tracker.debian.org>
6 Installed-Size:·596 Installed-Size:·61
7 Depends:·golang-github-opentracing-opentracing-go-dev7 Depends:·golang-github-opentracing-opentracing-go-dev
8 Section:·golang8 Section:·golang
9 Priority:·optional9 Priority:·optional
10 Homepage:·https://github.com/opentracing-contrib/go-stdlib10 Homepage:·https://github.com/opentracing-contrib/go-stdlib
11 Description:·OpenTracing·instrumentation·for·packages·in·the·Go·stdlib11 Description:·OpenTracing·instrumentation·for·packages·in·the·Go·stdlib
12 ·This·package·contains·OpenTracing·(http://opentracing.io/)·instrumentation·for12 ·This·package·contains·OpenTracing·(http://opentracing.io/)·instrumentation·for
13 ·packages·in·the·Go·standard·library.13 ·packages·in·the·Go·standard·library.
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
11.0 KB
data.tar.xz
11.0 KB
data.tar
3.46 KB
file list
    
Offset 1, 21 lines modifiedOffset 1, 21 lines modified
1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./
2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/
3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/
4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/doc/4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/doc/
5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/doc/golang-github-opentracing-contrib-go-stdlib-dev/5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/doc/golang-github-opentracing-contrib-go-stdlib-dev/
6 -rw-r--r--···0·root·········(0)·root·········(0)······742·2021-01-08·08:12:54.000000·./usr/share/doc/golang-github-opentracing-contrib-go-stdlib-dev/changelog.Debian.gz6 -rw-r--r--···0·root·········(0)·root·········(0)······761·2021-01-08·08:12:54.000000·./usr/share/doc/golang-github-opentracing-contrib-go-stdlib-dev/changelog.Debian.gz
7 -rw-r--r--···0·root·········(0)·root·········(0)·····1012·2021-01-08·08:12:54.000000·./usr/share/doc/golang-github-opentracing-contrib-go-stdlib-dev/copyright7 -rw-r--r--···0·root·········(0)·root·········(0)·····1012·2021-01-08·08:12:54.000000·./usr/share/doc/golang-github-opentracing-contrib-go-stdlib-dev/copyright
8 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/8 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/
9 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/9 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/
10 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/10 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/
11 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/11 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/
12 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/12 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/
13 -rw-r--r--···0·root·········(0)·root·········(0)······116·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/go.mod13 -rw-r--r--···0·root·········(0)·root·········(0)······116·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/go.mod
14 -rw-r--r--···0·root·········(0)·root·········(0)·····5082·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/go.sum14 -rw-r--r--···0·root·········(0)·root·········(0)·····5082·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/go.sum
15 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/15 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/
16 -rw-r--r--···0·root·········(0)·root·········(0)·····9318·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/client.go16 -rw-r--r--···0·root·········(0)·root·········(0)·····9741·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/client.go
17 -rw-r--r--···0·root·········(0)·root·········(0)·····6981·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/client_test.go17 -rw-r--r--···0·root·········(0)·root·········(0)·····8483·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/client_test.go
18 -rw-r--r--···0·root·········(0)·root·········(0)······101·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/doc.go18 -rw-r--r--···0·root·········(0)·root·········(0)······101·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/doc.go
19 -rw-r--r--···0·root·········(0)·root·········(0)·····4785·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/server.go19 -rw-r--r--···0·root·········(0)·root·········(0)·····4785·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/server.go
20 -rw-r--r--···0·root·········(0)·root·········(0)·····9842·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/server_test.go20 -rw-r--r--···0·root·········(0)·root·········(0)·····9842·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/server_test.go
21 -rw-r--r--···0·root·········(0)·root·········(0)·····5383·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/status-code-tracker.go21 -rw-r--r--···0·root·········(0)·root·········(0)·····5383·2021-01-08·08:12:54.000000·./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/status-code-tracker.go
805 B
./usr/share/doc/golang-github-opentracing-contrib-go-stdlib-dev/changelog.Debian.gz
639 B
changelog.Debian
    
Offset 1, 12 lines modifiedOffset 1, 13 lines modified
1 golang-github-opentracing-contrib-go-stdlib·(1.0.0-1~jan+unchanged1)·unchanged;·urgency=low1 golang-github-opentracing-contrib-go-stdlib·(1.0.0+git20201217.1.08d136d-1~jan+nus1)·fresh-snapshots;·urgency=low
  
 2 ··*·New·upstream·snapshot.
2 ··*·Build·for·debian-janitor·apt·repository.3 ··*·Build·for·debian-janitor·apt·repository.
  
3 ·--·Debian·Janitor·<janitor@jelmer.uk>··Sat,·10·Apr·2021·03:40:20·-00004 ·--·Debian·Janitor·<janitor@jelmer.uk>··Fri,·09·Apr·2021·13:19:16·-0000
  
4 golang-github-opentracing-contrib-go-stdlib·(1.0.0-1)·unstable;·urgency=medium5 golang-github-opentracing-contrib-go-stdlib·(1.0.0-1)·unstable;·urgency=medium
  
5 ··*·Team·upload.6 ··*·Team·upload.
  
6 ··[·Martina·Ferrari·]7 ··[·Martina·Ferrari·]
7 ··*·Stop·using·pristine-tar.8 ··*·Stop·using·pristine-tar.
3.49 KB
./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/client.go
    
Offset 30, 15 lines modifiedOffset 30, 15 lines modified
30 »       //·RoundTripper·defaults·to·http.DefaultTransport.30 »       //·RoundTripper·defaults·to·http.DefaultTransport.
31 »       http.RoundTripper31 »       http.RoundTripper
32 }32 }
  
33 type·clientOptions·struct·{33 type·clientOptions·struct·{
34 »       operationName············string34 »       operationName············string
35 »       componentName············string35 »       componentName············string
36 »       urlTagFunc·········func(u·*url.URL)·string36 »       urlTagFunc···············func(u·*url.URL)·string
37 »       disableClientTrace·······bool37 »       disableClientTrace·······bool
38 »       disableInjectSpanContext·bool38 »       disableInjectSpanContext·bool
39 »       spanObserver·············func(span·opentracing.Span,·r·*http.Request)39 »       spanObserver·············func(span·opentracing.Span,·r·*http.Request)
40 }40 }
  
41 //·ClientOption·contols·the·behavior·of·TraceRequest.41 //·ClientOption·contols·the·behavior·of·TraceRequest.
42 type·ClientOption·func(*clientOptions)42 type·ClientOption·func(*clientOptions)
Offset 145, 14 lines modifiedOffset 145, 26 lines modified
145 func·(c·closeTracker)·Close()·error·{145 func·(c·closeTracker)·Close()·error·{
146 »       err·:=·c.ReadCloser.Close()146 »       err·:=·c.ReadCloser.Close()
147 »       c.sp.LogFields(log.String("event",·"ClosedBody"))147 »       c.sp.LogFields(log.String("event",·"ClosedBody"))
148 »       c.sp.Finish()148 »       c.sp.Finish()
149 »       return·err149 »       return·err
150 }150 }
  
 151 type·writerCloseTracker·struct·{
 152 »       io.ReadWriteCloser
 153 »       sp·opentracing.Span
 154 }
  
 155 func·(c·writerCloseTracker)·Close()·error·{
 156 »       err·:=·c.ReadWriteCloser.Close()
 157 »       c.sp.LogFields(log.String("event",·"ClosedBody"))
 158 »       c.sp.Finish()
 159 »       return·err
 160 }
  
151 //·TracerFromRequest·retrieves·the·Tracer·from·the·request.·If·the·request·does161 //·TracerFromRequest·retrieves·the·Tracer·from·the·request.·If·the·request·does
152 //·not·have·a·Tracer·it·will·return·nil.162 //·not·have·a·Tracer·it·will·return·nil.
153 func·TracerFromRequest(req·*http.Request)·*Tracer·{163 func·TracerFromRequest(req·*http.Request)·*Tracer·{
154 »       tr,·ok·:=·req.Context().Value(keyTracer).(*Tracer)164 »       tr,·ok·:=·req.Context().Value(keyTracer).(*Tracer)
155 »       if·!ok·{165 »       if·!ok·{
156 »       »       return·nil166 »       »       return·nil
157 »       }167 »       }
Offset 170, 14 lines modifiedOffset 182, 15 lines modified
170 »       »       return·rt.RoundTrip(req)182 »       »       return·rt.RoundTrip(req)
171 »       }183 »       }
  
172 »       tracer.start(req)184 »       tracer.start(req)
  
173 »       ext.HTTPMethod.Set(tracer.sp,·req.Method)185 »       ext.HTTPMethod.Set(tracer.sp,·req.Method)
174 »       ext.HTTPUrl.Set(tracer.sp,·tracer.opts.urlTagFunc(req.URL))186 »       ext.HTTPUrl.Set(tracer.sp,·tracer.opts.urlTagFunc(req.URL))
 187 »       ext.PeerAddress.Set(tracer.sp,·req.URL.Host)
175 »       tracer.opts.spanObserver(tracer.sp,·req)188 »       tracer.opts.spanObserver(tracer.sp,·req)
  
176 »       if·!tracer.opts.disableInjectSpanContext·{189 »       if·!tracer.opts.disableInjectSpanContext·{
177 »       »       carrier·:=·opentracing.HTTPHeadersCarrier(req.Header)190 »       »       carrier·:=·opentracing.HTTPHeadersCarrier(req.Header)
178 »       »       tracer.sp.Tracer().Inject(tracer.sp.Context(),·opentracing.HTTPHeaders,·carrier)191 »       »       tracer.sp.Tracer().Inject(tracer.sp.Context(),·opentracing.HTTPHeaders,·carrier)
179 »       }192 »       }
  
Offset 190, 15 lines modifiedOffset 203, 20 lines modified
190 »       ext.HTTPStatusCode.Set(tracer.sp,·uint16(resp.StatusCode))203 »       ext.HTTPStatusCode.Set(tracer.sp,·uint16(resp.StatusCode))
191 »       if·resp.StatusCode·>=·http.StatusInternalServerError·{204 »       if·resp.StatusCode·>=·http.StatusInternalServerError·{
192 »       »       ext.Error.Set(tracer.sp,·true)205 »       »       ext.Error.Set(tracer.sp,·true)
193 »       }206 »       }
194 »       if·req.Method·==·"HEAD"·{207 »       if·req.Method·==·"HEAD"·{
195 »       »       tracer.sp.Finish()208 »       »       tracer.sp.Finish()
196 »       }·else·{209 »       }·else·{
 210 »       »       readWriteCloser,·ok·:=·resp.Body.(io.ReadWriteCloser)
 211 »       »       if·ok·{
 212 »       »       »       resp.Body·=·writerCloseTracker{readWriteCloser,·tracer.sp}
 213 »       »       }·else·{
197 »       »       resp.Body·=·closeTracker{resp.Body,·tracer.sp}214 »       »       »       resp.Body·=·closeTracker{resp.Body,·tracer.sp}
 215 »       »       }
198 »       }216 »       }
199 »       return·resp,·nil217 »       return·resp,·nil
200 }218 }
  
201 //·Tracer·holds·tracing·details·for·one·HTTP·request.219 //·Tracer·holds·tracing·details·for·one·HTTP·request.
202 type·Tracer·struct·{220 type·Tracer·struct·{
203 »       tr···opentracing.Tracer221 »       tr···opentracing.Tracer
Offset 219, 16 lines modifiedOffset 237, 15 lines modified
219 »       »       »       operationName·=·"HTTP·Client"237 »       »       »       operationName·=·"HTTP·Client"
220 »       »       }238 »       »       }
221 »       »       root·:=·h.tr.StartSpan(operationName,·opentracing.ChildOf(spanctx))239 »       »       root·:=·h.tr.StartSpan(operationName,·opentracing.ChildOf(spanctx))
222 »       »       h.root·=·root240 »       »       h.root·=·root
223 »       }241 »       }
  
224 »       ctx·:=·h.root.Context()242 »       ctx·:=·h.root.Context()
225 »       h.sp·=·h.tr.StartSpan("HTTP·"+req.Method,·opentracing.ChildOf(ctx))243 »       h.sp·=·h.tr.StartSpan("HTTP·"+req.Method,·opentracing.ChildOf(ctx),·ext.SpanKindRPCClient)
226 »       ext.SpanKindRPCClient.Set(h.sp) 
  
227 »       componentName·:=·h.opts.componentName244 »       componentName·:=·h.opts.componentName
228 »       if·componentName·==·""·{245 »       if·componentName·==·""·{
229 »       »       componentName·=·defaultComponentName246 »       »       componentName·=·defaultComponentName
230 »       }247 »       }
231 »       ext.Component.Set(h.sp,·componentName)248 »       ext.Component.Set(h.sp,·componentName)
  
Offset 262, 16 lines modifiedOffset 279, 15 lines modified
262 »       »       WroteHeaders:·········h.wroteHeaders,279 »       »       WroteHeaders:·········h.wroteHeaders,
263 »       »       Wait100Continue:······h.wait100Continue,280 »       »       Wait100Continue:······h.wait100Continue,
264 »       »       WroteRequest:·········h.wroteRequest,281 »       »       WroteRequest:·········h.wroteRequest,
265 »       }282 »       }
266 }283 }
  
267 func·(h·*Tracer)·getConn(hostPort·string)·{284 func·(h·*Tracer)·getConn(hostPort·string)·{
 285 »       h.sp.LogFields(log.String("event",·"GetConn"),·log.String("hostPort",·hostPort))
268 »       ext.HTTPUrl.Set(h.sp,·hostPort) 
269 »       h.sp.LogFields(log.String("event",·"GetConn")) 
270 }286 }
  
271 func·(h·*Tracer)·gotConn(info·httptrace.GotConnInfo)·{287 func·(h·*Tracer)·gotConn(info·httptrace.GotConnInfo)·{
272 »       h.sp.SetTag("net/http.reused",·info.Reused)288 »       h.sp.SetTag("net/http.reused",·info.Reused)
273 »       h.sp.SetTag("net/http.was_idle",·info.WasIdle)289 »       h.sp.SetTag("net/http.was_idle",·info.WasIdle)
274 »       h.sp.LogFields(log.String("event",·"GotConn"))290 »       h.sp.LogFields(log.String("event",·"GotConn"))
275 }291 }
3.24 KB
./usr/share/gocode/src/github.com/opentracing-contrib/go-stdlib/nethttp/client_test.go
    
Offset 1, 10 lines modifiedOffset 1, 13 lines modified
1 package·nethttp1 package·nethttp
  
2 import·(2 import·(
 3 »       "bytes"
 4 »       "fmt"
 5 »       "io"
3 »       "net/http"6 »       "net/http"
4 »       "net/http/httptest"7 »       "net/http/httptest"
5 »       "net/url"8 »       "net/url"
6 »       "testing"9 »       "testing"
  
7 »       opentracing·"github.com/opentracing/opentracing-go"10 »       opentracing·"github.com/opentracing/opentracing-go"
8 »       "github.com/opentracing/opentracing-go/ext"11 »       "github.com/opentracing/opentracing-go/ext"
Offset 131, 14 lines modifiedOffset 134, 72 lines modified
  
131 »       ht·=·TracerFromRequest(req)134 »       ht·=·TracerFromRequest(req)
132 »       if·ht·!=·expected·{135 »       if·ht·!=·expected·{
133 »       »       t.Fatalf("got·%v,·expected·%v",·ht,·expected)136 »       »       t.Fatalf("got·%v,·expected·%v",·ht,·expected)
134 »       }137 »       }
135 }138 }
  
 139 func·TestWriteCloserFromRequest(t·*testing.T)·{
 140 »       wait·:=·make(chan·bool,·0)
 141 »       srv·:=·httptest.NewServer(http.HandlerFunc(func(w·http.ResponseWriter,·r·*http.Request)·{
 142 »       »       defer·func()·{
 143 »       »       »       wait·<-·true
 144 »       »       }()
  
 145 »       »       w.Header().Set("Upgrade",·"websocket")
 146 »       »       w.Header().Set("Connection",·"Upgrade")
 147 »       »       w.WriteHeader(http.StatusSwitchingProtocols)
  
 148 »       »       hijacker·:=·w.(http.Hijacker)
 149 »       »       _,·rw,·err·:=·hijacker.Hijack()
  
 150 »       »       if·err·!=·nil·{
 151 »       »       »       t.Fatal("Failed·to·hijack·connection")
 152 »       »       }
  
 153 »       »       line,·_,·err·:=·rw.ReadLine()
 154 »       »       if·string(line)·!=·"ping"·{
 155 »       »       »       t.Fatalf("Expected·'ping'·received·%q",·string(line))
 156 »       »       }
  
 157 »       »       if·err·!=·nil·{
 158 »       »       »       t.Fatal(err)
 159 »       »       }
 160 »       }))
  
 161 »       var·buf·bytes.Buffer
 162 »       req,·err·:=·http.NewRequest("POST",·srv.URL,·&buf)
 163 »       req.Header.Set("Connection",·"upgrade")
 164 »       req.Header.Set("Upgrade",·"websocket")
 165 »       req.Proto·=·"HTTP/1.1"
 166 »       req.ProtoMajor·=·1
 167 »       req.ProtoMinor·=·1
 168 »       if·err·!=·nil·{
 169 »       »       t.Fatal(err)
 170 »       }
  
 171 »       tr·:=·&mocktracer.MockTracer{}
 172 »       req,·_·=·TraceRequest(tr,·req)
  
 173 »       client·:=·&http.Client{Transport:·&Transport{}}
 174 »       resp,·err·:=·client.Do(req)
 175 »       if·err·!=·nil·{
 176 »       »       t.Fatal(err)
 177 »       }
  
 178 »       rw,·ok·:=·resp.Body.(io.ReadWriteCloser)
 179 »       if·!ok·{
 180 »       »       t.Fatal("resp.Body·is·not·a·io.ReadWriteCloser")
 181 »       }
  
 182 »       fmt.Fprint(rw,·"ping\n")
 183 »       <-wait
 184 »       rw.Close()
 185 }
  
136 func·TestInjectSpanContext(t·*testing.T)·{186 func·TestInjectSpanContext(t·*testing.T)·{
137 »       tests·:=·[]struct·{187 »       tests·:=·[]struct·{
138 »       »       name·····················string188 »       »       name·····················string
139 »       »       expectContextPropagation·bool189 »       »       expectContextPropagation·bool
140 »       »       opts·····················[]ClientOption190 »       »       opts·····················[]ClientOption
141 »       }{191 »       }{
142 »       »       {name:·"Default",·expectContextPropagation:·true,·opts:·nil},192 »       »       {name:·"Default",·expectContextPropagation:·true,·opts:·nil},
Offset 223, 16 lines modifiedOffset 284, 16 lines modified
  
223 »       tests·:=·[]struct·{284 »       tests·:=·[]struct·{
224 »       »       opts·[]ClientOption285 »       »       opts·[]ClientOption
225 »       »       url··string286 »       »       url··string
226 »       »       tag··string287 »       »       tag··string
227 »       }{288 »       }{
228 »       »       //·These·first·cases·fail·early289 »       »       //·These·first·cases·fail·early
229 »       »       {[]ClientOption{},·"/ok?token=a",·srv.Listener.Addr().String()},290 »       »       {[]ClientOption{},·"/ok?token=a",·srv.URL·+·"/ok?token=a"},
230 »       »       {[]ClientOption{URLTagFunc(fn)},·"/ok?token=c",·srv.Listener.Addr().String()},291 »       »       {[]ClientOption{URLTagFunc(fn)},·"/ok?token=c",·srv.URL·+·"/ok?token=*"},
231 »       »       //·Disable·ClientTrace·to·fire·RoundTrip292 »       »       //·Disable·ClientTrace·to·fire·RoundTrip
232 »       »       {[]ClientOption{ClientTrace(false)},·"/ok?token=b",·srv.URL·+·"/ok?token=b"},293 »       »       {[]ClientOption{ClientTrace(false)},·"/ok?token=b",·srv.URL·+·"/ok?token=b"},
233 »       »       {[]ClientOption{ClientTrace(false),·URLTagFunc(fn)},·"/ok?token=c",·srv.URL·+·"/ok?token=*"},294 »       »       {[]ClientOption{ClientTrace(false),·URLTagFunc(fn)},·"/ok?token=c",·srv.URL·+·"/ok?token=*"},
234 »       }295 »       }
  
235 »       for·_,·tt·:=·range·tests·{296 »       for·_,·tt·:=·range·tests·{
236 »       »       var·clientSpan·*mocktracer.MockSpan297 »       »       var·clientSpan·*mocktracer.MockSpan
Offset 247, 9 lines modifiedOffset 308, 16 lines modified
247 »       »       if·clientSpan·==·nil·{308 »       »       if·clientSpan·==·nil·{
248 »       »       »       t.Fatal("cannot·find·client·span")309 »       »       »       t.Fatal("cannot·find·client·span")
249 »       »       }310 »       »       }
250 »       »       tag·:=·clientSpan.Tags()["http.url"]311 »       »       tag·:=·clientSpan.Tags()["http.url"]
251 »       »       if·got,·want·:=·tag,·tt.tag;·got·!=·want·{312 »       »       if·got,·want·:=·tag,·tt.tag;·got·!=·want·{
252 »       »       »       t.Fatalf("got·%s·tag·name,·expected·%s",·got,·want)313 »       »       »       t.Fatalf("got·%s·tag·name,·expected·%s",·got,·want)
253 »       »       }314 »       »       }
 315 »       »       peerAddress,·ok·:=·clientSpan.Tags()["peer.address"]
 316 »       »       if·!ok·{
 317 »       »       »       t.Fatal("cannot·find·peer.address·tag")
 318 »       »       }
 319 »       »       if·peerAddress·!=·srv.Listener.Addr().String()·{
 320 »       »       »       t.Fatalf("got·%s·want·%s·in·peer.address·tag",·peerAddress,·srv.Listener.Addr().String())
 321 »       »       }
254 »       }322 »       }
255 }323 }