Commit c27749b8 authored by ale's avatar ale
Browse files

Update ai3/go-common

parent 24e622b7
Pipeline #1629 passed with stages
in 1 minute and 19 seconds
...@@ -126,6 +126,11 @@ func initTracing(endpointAddr string) { ...@@ -126,6 +126,11 @@ func initTracing(endpointAddr string) {
}) })
} }
// Init tracing support, if not using WrapHandler.
func Init() {
initTracing("")
}
// WrapTransport optionally wraps a http.RoundTripper with OpenCensus // WrapTransport optionally wraps a http.RoundTripper with OpenCensus
// tracing functionality, if it is globally enabled. // tracing functionality, if it is globally enabled.
func WrapTransport(t http.RoundTripper) http.RoundTripper { func WrapTransport(t http.RoundTripper) http.RoundTripper {
...@@ -136,7 +141,7 @@ func WrapTransport(t http.RoundTripper) http.RoundTripper { ...@@ -136,7 +141,7 @@ func WrapTransport(t http.RoundTripper) http.RoundTripper {
} }
// WrapHandler wraps a http.Handler with OpenCensus tracing // WrapHandler wraps a http.Handler with OpenCensus tracing
// functionality, if globally enabled. // functionality, if globally enabled. Automatically calls Init().
func WrapHandler(h http.Handler, endpointAddr string) http.Handler { func WrapHandler(h http.Handler, endpointAddr string) http.Handler {
if Enabled { if Enabled {
initTracing(endpointAddr) initTracing(endpointAddr)
......
...@@ -5,38 +5,38 @@ ...@@ -5,38 +5,38 @@
{ {
"checksumSHA1": "pLvPnUablirQucyALgrso9hLG4E=", "checksumSHA1": "pLvPnUablirQucyALgrso9hLG4E=",
"path": "git.autistici.org/ai3/go-common", "path": "git.autistici.org/ai3/go-common",
"revision": "438dda6c699e73e612d0b16143076998d77c03ac", "revision": "be955ddc61cf2c555747032befd4ff1a7d0b8097",
"revisionTime": "2018-11-22T23:09:18Z" "revisionTime": "2018-11-23T00:00:52Z"
}, },
{ {
"checksumSHA1": "1ChQcW9Biu/AgiKjsbJFg/+WhjQ=", "checksumSHA1": "1ChQcW9Biu/AgiKjsbJFg/+WhjQ=",
"path": "git.autistici.org/ai3/go-common/clientutil", "path": "git.autistici.org/ai3/go-common/clientutil",
"revision": "438dda6c699e73e612d0b16143076998d77c03ac", "revision": "be955ddc61cf2c555747032befd4ff1a7d0b8097",
"revisionTime": "2018-11-22T23:09:18Z" "revisionTime": "2018-11-23T00:00:52Z"
}, },
{ {
"checksumSHA1": "npDdYYmInhdVxcCpOQ844cVlfzQ=", "checksumSHA1": "npDdYYmInhdVxcCpOQ844cVlfzQ=",
"path": "git.autistici.org/ai3/go-common/ldap", "path": "git.autistici.org/ai3/go-common/ldap",
"revision": "438dda6c699e73e612d0b16143076998d77c03ac", "revision": "be955ddc61cf2c555747032befd4ff1a7d0b8097",
"revisionTime": "2018-11-22T23:09:18Z" "revisionTime": "2018-11-23T00:00:52Z"
}, },
{ {
"checksumSHA1": "mfFIqmwojDqQdJvjLI3y7YCQ+2c=", "checksumSHA1": "mfFIqmwojDqQdJvjLI3y7YCQ+2c=",
"path": "git.autistici.org/ai3/go-common/pwhash", "path": "git.autistici.org/ai3/go-common/pwhash",
"revision": "438dda6c699e73e612d0b16143076998d77c03ac", "revision": "be955ddc61cf2c555747032befd4ff1a7d0b8097",
"revisionTime": "2018-11-22T23:09:18Z" "revisionTime": "2018-11-23T00:00:52Z"
}, },
{ {
"checksumSHA1": "tWzCSEieYFl5VnKhFTosgveO6Ys=", "checksumSHA1": "Tg+SdJQAHgRbNyZoIyh8d9TwLvY=",
"path": "git.autistici.org/ai3/go-common/tracing", "path": "git.autistici.org/ai3/go-common/tracing",
"revision": "438dda6c699e73e612d0b16143076998d77c03ac", "revision": "be955ddc61cf2c555747032befd4ff1a7d0b8097",
"revisionTime": "2018-11-22T23:09:18Z" "revisionTime": "2018-11-23T00:00:52Z"
}, },
{ {
"checksumSHA1": "R18oCPkWjuPqDxPgKvG1KhiSJns=", "checksumSHA1": "R18oCPkWjuPqDxPgKvG1KhiSJns=",
"path": "git.autistici.org/ai3/go-common/unix", "path": "git.autistici.org/ai3/go-common/unix",
"revision": "438dda6c699e73e612d0b16143076998d77c03ac", "revision": "be955ddc61cf2c555747032befd4ff1a7d0b8097",
"revisionTime": "2018-11-22T23:09:18Z" "revisionTime": "2018-11-23T00:00:52Z"
}, },
{ {
"checksumSHA1": "NtTOmajRf6xh0mkVSm18L70ncl0=", "checksumSHA1": "NtTOmajRf6xh0mkVSm18L70ncl0=",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment