diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-25 21:40:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-25 21:40:38 +0200 |
commit | 5b7086abda91f4301af3bfb642d416a22349c276 (patch) | |
tree | bf139f29b261e55c161394637f1c7073da5103f0 /vendor/github.com/uber | |
parent | a488e197a6e3947dd420b40ed834b50db9c829c3 (diff) | |
parent | 2388222e98462fdbbe44f3e091b2b79d80956a9a (diff) | |
download | podman-5b7086abda91f4301af3bfb642d416a22349c276.tar.gz podman-5b7086abda91f4301af3bfb642d416a22349c276.tar.bz2 podman-5b7086abda91f4301af3bfb642d416a22349c276.zip |
Merge pull request #3418 from vrothberg/go-modules
update dependencies
Diffstat (limited to 'vendor/github.com/uber')
18 files changed, 253 insertions, 107 deletions
diff --git a/vendor/github.com/uber/jaeger-client-go/.travis.yml b/vendor/github.com/uber/jaeger-client-go/.travis.yml index a6bd65d67..acdc2a010 100644 --- a/vendor/github.com/uber/jaeger-client-go/.travis.yml +++ b/vendor/github.com/uber/jaeger-client-go/.travis.yml @@ -7,18 +7,18 @@ dist: trusty matrix: include: - - go: 1.11.5 + - go: 1.12.x env: - TESTS=true - COVERAGE=true - - go: 1.11.5 + - go: 1.12.x env: - CROSSDOCK=true - - go: 1.11.5 + - go: 1.12.x env: - TESTS=true - USE_DEP=true - - go: 1.10.8 + - go: 1.11.x env: - TESTS=true - USE_DEP=true diff --git a/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md b/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md index 4b3568ac1..05216d5a8 100644 --- a/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md +++ b/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md @@ -1,10 +1,23 @@ Changes by Version ================== -2.15.1 (unreleased) -------------------- - -- nothing yet +2.16.0 (2019-03-24) +------------------- + +- Add baggage to B3 codec (#319) <Pavol Loffay> +- Add support for 128bit trace ids to zipkin thrift spans. (#378) <Douglas Reid> +- Update zipkin propagation logic to support 128bit traceIDs (#373) <Douglas Reid> +- Accept "true" for the x-b3-sampled header (#356) <Adrian Bogatu> + +- Allow setting of PoolSpans from Config object (#322) <Matthew Pound> +- Make propagators public to allow wrapping (#379) <Ivan Babrou> +- Change default metric namespace to use relevant separator for the metric backend (#364) <Gary Brown> +- Change metrics prefix to jaeger_tracer and add descriptions (#346) <Gary Brown> +- Bump OpenTracing to ^1.1.x (#383) <Yuri Shkuro> +- Upgrade jaeger-lib to v2.0.0 (#359) <Gary Brown> +- Avoid defer when generating random number (#358) <Gary Brown> +- Use a pool of rand.Source to reduce lock contention when creating span ids (#357) <Gary Brown> +- Make JAEGER_ENDPOINT take priority over JAEGER_AGENT_XXX (#342) <Eundoo Song> 2.15.0 (2018-10-10) diff --git a/vendor/github.com/uber/jaeger-client-go/Gopkg.lock b/vendor/github.com/uber/jaeger-client-go/Gopkg.lock index 0cbdadf7d..55d9ac030 100644 --- a/vendor/github.com/uber/jaeger-client-go/Gopkg.lock +++ b/vendor/github.com/uber/jaeger-client-go/Gopkg.lock @@ -3,175 +3,177 @@ [[projects]] branch = "master" - digest = "1:c0bec5f9b98d0bc872ff5e834fac186b807b656683bd29cb82fb207a1513fabb" + digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" name = "github.com/beorn7/perks" packages = ["quantile"] - pruneopts = "" + pruneopts = "UT" revision = "3a771d992973f24aa725d07868b467d1ddfceafb" [[projects]] branch = "master" - digest = "1:c46fd324e7902268373e1b337436a6377c196e2dbd7b35624c6256d29d494e78" + digest = "1:4c4c33075b704791d6a7f09dfb55c66769e8a1dc6adf87026292d274fe8ad113" name = "github.com/codahale/hdrhistogram" packages = ["."] - pruneopts = "" + pruneopts = "UT" revision = "3a0bb77429bd3a61596f5e8a3172445844342120" [[projects]] branch = "master" - digest = "1:5d9e0d8f9e3d9b475ec00b7f6c4836e42e2c3cf4a1ed8221f35f5b7b7d7c1b19" + digest = "1:a382acd6150713655ded76ab5fbcbc7924a7808dab4312dda5d1f23dd8ce5277" name = "github.com/crossdock/crossdock-go" packages = [ ".", "assert", "require", ] - pruneopts = "" + pruneopts = "UT" revision = "049aabb0122b03bc9bd30cab8f3f91fb60166361" [[projects]] - digest = "1:56c130d885a4aacae1dd9c7b71cfe39912c7ebc1ff7d2b46083c8812996dc43b" + digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" name = "github.com/davecgh/go-spew" packages = ["spew"] - pruneopts = "" - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" + pruneopts = "UT" + revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" + version = "v1.1.1" [[projects]] - digest = "1:bcb38c8fc9b21bb8682ce2d605a7d4aeb618abc7f827e3ac0b27c0371fdb23fb" + digest = "1:318f1c959a8a740366fce4b1e1eb2fd914036b4af58fbd0a003349b305f118ad" name = "github.com/golang/protobuf" packages = ["proto"] - pruneopts = "" - revision = "925541529c1fa6821df4e44ce2723319eb2be768" - version = "v1.0.0" + pruneopts = "UT" + revision = "b5d812f8a3706043e23a9cd5babf2e5423744d30" + version = "v1.3.1" [[projects]] - digest = "1:4c23ced97a470b17d9ffd788310502a077b9c1f60221a85563e49696276b4147" + digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" name = "github.com/matttproud/golang_protobuf_extensions" packages = ["pbutil"] - pruneopts = "" - revision = "3247c84500bff8d9fb6d579d800f20b3e091582c" - version = "v1.0.0" + pruneopts = "UT" + revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" + version = "v1.0.1" [[projects]] - digest = "1:78fb99d6011c2ae6c72f3293a83951311147b12b06a5ffa43abf750c4fab6ac5" + digest = "1:727b8f567a30d0739d6c26b9472b3422b351c93cf62095164c845a54b16fc18e" name = "github.com/opentracing/opentracing-go" packages = [ ".", "ext", + "harness", "log", ] - pruneopts = "" - revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38" - version = "v1.0.2" + pruneopts = "UT" + revision = "659c90643e714681897ec2521c60567dd21da733" + version = "v1.1.0" [[projects]] - digest = "1:7365acd48986e205ccb8652cc746f09c8b7876030d53710ea6ef7d0bd0dcd7ca" + digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b" name = "github.com/pkg/errors" packages = ["."] - pruneopts = "" - revision = "645ef00459ed84a119197bfb8d8205042c6df63d" - version = "v0.8.0" + pruneopts = "UT" + revision = "ba968bfe8b2f7e042a574c888954fccecfa385b4" + version = "v0.8.1" [[projects]] - digest = "1:256484dbbcd271f9ecebc6795b2df8cad4c458dd0f5fd82a8c2fa0c29f233411" + digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" name = "github.com/pmezard/go-difflib" packages = ["difflib"] - pruneopts = "" + pruneopts = "UT" revision = "792786c7400a136282c1664665ae0a8db921c6c2" version = "v1.0.0" [[projects]] - digest = "1:4142d94383572e74b42352273652c62afec5b23f325222ed09198f46009022d1" + digest = "1:b6221ec0f8903b556e127c449e7106b63e6867170c2d10a7c058623d086f2081" name = "github.com/prometheus/client_golang" packages = ["prometheus"] - pruneopts = "" + pruneopts = "UT" revision = "c5b7fccd204277076155f10851dad72b76a49317" version = "v0.8.0" [[projects]] branch = "master" - digest = "1:60aca47f4eeeb972f1b9da7e7db51dee15ff6c59f7b401c1588b8e6771ba15ef" + digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" name = "github.com/prometheus/client_model" packages = ["go"] - pruneopts = "" - revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c" + pruneopts = "UT" + revision = "fd36f4220a901265f90734c3183c5f0c91daa0b8" [[projects]] - branch = "master" - digest = "1:b841dfec30d5d89de895adfa2314a031b2c65b402af11b89a221f2e986639c8f" + digest = "1:35cf6bdf68db765988baa9c4f10cc5d7dda1126a54bd62e252dbcd0b1fc8da90" name = "github.com/prometheus/common" packages = [ "expfmt", "internal/bitbucket.org/ww/goautoneg", "model", ] - pruneopts = "" - revision = "d811d2e9bf898806ecfb6ef6296774b13ffc314c" + pruneopts = "UT" + revision = "cfeb6f9992ffa54aaa4f2170ade4067ee478b250" + version = "v0.2.0" [[projects]] branch = "master" - digest = "1:61df0898746840afc7be5dc2c3eeec83022fab70df11ecee5b16c85e912cf5ed" + digest = "1:c31163bd62461e0c5f7ddc7363e39ef8d9e929693e77b5c11c709b05f9cb9219" name = "github.com/prometheus/procfs" packages = [ ".", "internal/util", + "iostats", "nfs", "xfs", ] - pruneopts = "" - revision = "8b1c2da0d56deffdbb9e48d4414b4e674bd8083e" + pruneopts = "UT" + revision = "55ae3d9d557340b5bc24cd8aa5f6fa2c2ab31352" [[projects]] - digest = "1:a30066593578732a356dc7e5d7f78d69184ca65aeeff5939241a3ab10559bb06" + digest = "1:8ff03ccc603abb0d7cce94d34b613f5f6251a9e1931eba1a3f9888a9029b055c" name = "github.com/stretchr/testify" packages = [ "assert", "require", "suite", ] - pruneopts = "" - revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" - version = "v1.2.1" + pruneopts = "UT" + revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" + version = "v1.3.0" [[projects]] - digest = "1:6e8d05f4da3ff913adf807cb34623811f764b4924369f65c3ab9db744e8fe6ad" + digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d" name = "github.com/uber-go/atomic" packages = ["."] - pruneopts = "" - revision = "8474b86a5a6f79c443ce4b2992817ff32cf208b8" - version = "v1.3.1" + pruneopts = "UT" + revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289" + version = "v1.3.2" [[projects]] - digest = "1:2e2e1bf63381476d203354c0c3c4692d103e8d02ea2bfafe8e3f80a04c925b87" + digest = "1:f5c5ad1e08141e18aee1b9c37729d93d06805840421ccfc9d407787ffe969ce6" name = "github.com/uber/jaeger-lib" packages = [ "metrics", "metrics/metricstest", "metrics/prometheus", ] - pruneopts = "" + pruneopts = "UT" revision = "0e30338a695636fe5bcf7301e8030ce8dd2a8530" version = "v2.0.0" [[projects]] - digest = "1:ecd794db626d001bd7e9115eb5f1c9cf85ab27ef3b5acd49795672f74f5a3ca5" + digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d" name = "go.uber.org/atomic" packages = ["."] - pruneopts = "" - revision = "54f72d32435d760d5604f17a82e2435b28dc4ba5" - version = "v1.3.0" + pruneopts = "UT" + revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289" + version = "v1.3.2" [[projects]] - digest = "1:22c7effcb4da0eacb2bb1940ee173fac010e9ef3c691f5de4b524d538bd980f5" + digest = "1:60bf2a5e347af463c42ed31a493d817f8a72f102543060ed992754e689805d1a" name = "go.uber.org/multierr" packages = ["."] - pruneopts = "" + pruneopts = "UT" revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a" version = "v1.1.0" [[projects]] - digest = "1:6c2f76bad9a8ae48ec06108899e065a327d01afa43300f652443a05678cdca17" + digest = "1:c52caf7bd44f92e54627a31b85baf06a68333a196b3d8d241480a774733dcf8b" name = "go.uber.org/zap" packages = [ ".", @@ -181,20 +183,20 @@ "internal/exit", "zapcore", ] - pruneopts = "" - revision = "eeedf312bc6c57391d84767a4cd413f02a917974" - version = "v1.8.0" + pruneopts = "UT" + revision = "ff33455a0e382e8a81d14dd7c922020b6b5e7982" + version = "v1.9.1" [[projects]] branch = "master" - digest = "1:80ec738f420f13c23460cc92cd893d3e403588c60682afebbd4515eca5e19578" + digest = "1:f8b491a7c25030a895a0e579742d07136e6958e77ef2d46e769db8eec4e58fcd" name = "golang.org/x/net" packages = [ "context", "context/ctxhttp", ] - pruneopts = "" - revision = "5f9ae10d9af5b1c89ae6904293b14b064d4ada23" + pruneopts = "UT" + revision = "addf6b3196f61cd44ce5a76657913698c73479d0" [solve-meta] analyzer-name = "dep" @@ -203,6 +205,7 @@ "github.com/crossdock/crossdock-go", "github.com/opentracing/opentracing-go", "github.com/opentracing/opentracing-go/ext", + "github.com/opentracing/opentracing-go/harness", "github.com/opentracing/opentracing-go/log", "github.com/pkg/errors", "github.com/prometheus/client_golang/prometheus", diff --git a/vendor/github.com/uber/jaeger-client-go/Gopkg.toml b/vendor/github.com/uber/jaeger-client-go/Gopkg.toml index ee84766ad..067f15a92 100644 --- a/vendor/github.com/uber/jaeger-client-go/Gopkg.toml +++ b/vendor/github.com/uber/jaeger-client-go/Gopkg.toml @@ -4,7 +4,7 @@ [[constraint]] name = "github.com/opentracing/opentracing-go" - version = "^1" + version = "^1.1" [[constraint]] name = "github.com/prometheus/client_golang" @@ -25,3 +25,7 @@ [[constraint]] name = "go.uber.org/zap" version = "^1" + +[prune] + go-tests = true + unused-packages = true diff --git a/vendor/github.com/uber/jaeger-client-go/Makefile b/vendor/github.com/uber/jaeger-client-go/Makefile index 105e5372a..1b10c0964 100644 --- a/vendor/github.com/uber/jaeger-client-go/Makefile +++ b/vendor/github.com/uber/jaeger-client-go/Makefile @@ -35,6 +35,9 @@ test-and-lint: test fmt lint .PHONY: test test: +ifeq ($(USE_DEP),true) + dep check +endif bash -c "set -e; set -o pipefail; $(GOTEST) $(PACKAGES) | $(COLORIZE)" .PHONY: fmt diff --git a/vendor/github.com/uber/jaeger-client-go/config/config.go b/vendor/github.com/uber/jaeger-client-go/config/config.go index 821333ddb..320125087 100644 --- a/vendor/github.com/uber/jaeger-client-go/config/config.go +++ b/vendor/github.com/uber/jaeger-client-go/config/config.go @@ -231,6 +231,7 @@ func (c Configuration) NewTracer(options ...Option) (opentracing.Tracer, io.Clos jaeger.TracerOptions.Logger(opts.logger), jaeger.TracerOptions.CustomHeaderKeys(c.Headers), jaeger.TracerOptions.Gen128Bit(opts.gen128Bit), + jaeger.TracerOptions.PoolSpans(opts.poolSpans), jaeger.TracerOptions.ZipkinSharedRPCSpan(opts.zipkinSharedRPCSpan), jaeger.TracerOptions.MaxTagValueLength(opts.maxTagValueLength), } diff --git a/vendor/github.com/uber/jaeger-client-go/config/options.go b/vendor/github.com/uber/jaeger-client-go/config/options.go index 9eed0ec75..322691bea 100644 --- a/vendor/github.com/uber/jaeger-client-go/config/options.go +++ b/vendor/github.com/uber/jaeger-client-go/config/options.go @@ -33,6 +33,7 @@ type Options struct { contribObservers []jaeger.ContribObserver observers []jaeger.Observer gen128Bit bool + poolSpans bool zipkinSharedRPCSpan bool maxTagValueLength int tags []opentracing.Tag @@ -93,6 +94,13 @@ func Gen128Bit(gen128Bit bool) Option { } } +// PoolSpans specifies whether to pool spans +func PoolSpans(poolSpans bool) Option { + return func(c *Options) { + c.poolSpans = poolSpans + } +} + // ZipkinSharedRPCSpan creates an option that enables sharing span ID between client // and server spans a la zipkin. If false, client and server spans will be assigned // different IDs. diff --git a/vendor/github.com/uber/jaeger-client-go/constants.go b/vendor/github.com/uber/jaeger-client-go/constants.go index 5a4e18752..aa2d43fc8 100644 --- a/vendor/github.com/uber/jaeger-client-go/constants.go +++ b/vendor/github.com/uber/jaeger-client-go/constants.go @@ -16,7 +16,7 @@ package jaeger const ( // JaegerClientVersion is the version of the client library reported as Span tag. - JaegerClientVersion = "Go-2.15.1dev" + JaegerClientVersion = "Go-2.16.0" // JaegerClientVersionTagKey is the name of the tag used to report client version. JaegerClientVersionTagKey = "jaeger.version" diff --git a/vendor/github.com/uber/jaeger-client-go/context.go b/vendor/github.com/uber/jaeger-client-go/context.go index 8b06173d9..90045f4fc 100644 --- a/vendor/github.com/uber/jaeger-client-go/context.go +++ b/vendor/github.com/uber/jaeger-client-go/context.go @@ -198,7 +198,7 @@ func (c SpanContext) WithBaggageItem(key, value string) SpanContext { // extract method, but now it returns a dummy context with only debugID filled in. // // See JaegerDebugHeader in constants.go -// See textMapPropagator#Extract +// See TextMapPropagator#Extract func (c *SpanContext) isDebugIDContainerOnly() bool { return !c.traceID.IsValid() && c.debugID != "" } diff --git a/vendor/github.com/uber/jaeger-client-go/glide.lock b/vendor/github.com/uber/jaeger-client-go/glide.lock index 704795b6d..af659ca0e 100644 --- a/vendor/github.com/uber/jaeger-client-go/glide.lock +++ b/vendor/github.com/uber/jaeger-client-go/glide.lock @@ -1,5 +1,5 @@ -hash: 3accf84f97bff4a91162736104c0e9b9790820712bd86db6fec5e665f7196a82 -updated: 2018-04-30T11:46:43.804556-04:00 +hash: 92cc8f956428fc65bee07d809a752f34376aece141c934eff02aefa08d450b72 +updated: 2019-03-23T18:26:09.960887-04:00 imports: - name: github.com/beorn7/perks version: 3a771d992973f24aa725d07868b467d1ddfceafb @@ -13,7 +13,7 @@ imports: - assert - require - name: github.com/davecgh/go-spew - version: 8991bc29aa16c548c550c7ff78260e27b9ab7c73 + version: d8f796af33cc11cb798c1aaeb27a4ebc5099927d subpackages: - spew - name: github.com/golang/protobuf @@ -25,12 +25,13 @@ imports: subpackages: - pbutil - name: github.com/opentracing/opentracing-go - version: 1949ddbfd147afd4d964a9f00b24eb291e0e7c38 + version: 659c90643e714681897ec2521c60567dd21da733 subpackages: - ext + - harness - log - name: github.com/pkg/errors - version: 645ef00459ed84a119197bfb8d8205042c6df63d + version: ba968bfe8b2f7e042a574c888954fccecfa385b4 - name: github.com/pmezard/go-difflib version: 792786c7400a136282c1664665ae0a8db921c6c2 subpackages: @@ -56,7 +57,7 @@ imports: - nfs - xfs - name: github.com/stretchr/testify - version: 12b6f73e6084dad08a7c6e575284b177ecafbc71 + version: f35b8ab0b5a2cef36673838d662e249dd9c94686 subpackages: - assert - require @@ -68,11 +69,11 @@ imports: - metrics/metricstest - metrics/prometheus - name: go.uber.org/atomic - version: 8474b86a5a6f79c443ce4b2992817ff32cf208b8 + version: 1ea20fb1cbb1cc08cbd0d913a96dead89aa18289 - name: go.uber.org/multierr version: 3c4937480c32f4c13a875a1829af76c98ca3d40a - name: go.uber.org/zap - version: eeedf312bc6c57391d84767a4cd413f02a917974 + version: ff33455a0e382e8a81d14dd7c922020b6b5e7982 subpackages: - buffer - internal/bufferpool @@ -80,7 +81,7 @@ imports: - internal/exit - zapcore - name: golang.org/x/net - version: 6078986fec03a1dcc236c34816c71b0e05018fda + version: 49bb7cea24b1df9410e1712aa6433dae904ff66a subpackages: - context - context/ctxhttp diff --git a/vendor/github.com/uber/jaeger-client-go/glide.yaml b/vendor/github.com/uber/jaeger-client-go/glide.yaml index c33badf54..b3e5b80bc 100644 --- a/vendor/github.com/uber/jaeger-client-go/glide.yaml +++ b/vendor/github.com/uber/jaeger-client-go/glide.yaml @@ -1,7 +1,7 @@ package: github.com/uber/jaeger-client-go import: - package: github.com/opentracing/opentracing-go - version: ^1 + version: ^1.1 subpackages: - ext - log diff --git a/vendor/github.com/uber/jaeger-client-go/header.go b/vendor/github.com/uber/jaeger-client-go/header.go index 19c2c055b..5da70351d 100644 --- a/vendor/github.com/uber/jaeger-client-go/header.go +++ b/vendor/github.com/uber/jaeger-client-go/header.go @@ -38,7 +38,8 @@ type HeadersConfig struct { TraceBaggageHeaderPrefix string `yaml:"traceBaggageHeaderPrefix"` } -func (c *HeadersConfig) applyDefaults() *HeadersConfig { +// ApplyDefaults sets missing configuration keys to default values +func (c *HeadersConfig) ApplyDefaults() *HeadersConfig { if c.JaegerBaggageHeader == "" { c.JaegerBaggageHeader = JaegerBaggageHeader } diff --git a/vendor/github.com/uber/jaeger-client-go/propagation.go b/vendor/github.com/uber/jaeger-client-go/propagation.go index abca67a3c..5b50cfb71 100644 --- a/vendor/github.com/uber/jaeger-client-go/propagation.go +++ b/vendor/github.com/uber/jaeger-client-go/propagation.go @@ -51,15 +51,17 @@ type Extractor interface { Extract(carrier interface{}) (SpanContext, error) } -type textMapPropagator struct { +// TextMapPropagator is a combined Injector and Extractor for TextMap format +type TextMapPropagator struct { headerKeys *HeadersConfig metrics Metrics encodeValue func(string) string decodeValue func(string) string } -func newTextMapPropagator(headerKeys *HeadersConfig, metrics Metrics) *textMapPropagator { - return &textMapPropagator{ +// NewTextMapPropagator creates a combined Injector and Extractor for TextMap format +func NewTextMapPropagator(headerKeys *HeadersConfig, metrics Metrics) *TextMapPropagator { + return &TextMapPropagator{ headerKeys: headerKeys, metrics: metrics, encodeValue: func(val string) string { @@ -71,8 +73,9 @@ func newTextMapPropagator(headerKeys *HeadersConfig, metrics Metrics) *textMapPr } } -func newHTTPHeaderPropagator(headerKeys *HeadersConfig, metrics Metrics) *textMapPropagator { - return &textMapPropagator{ +// NewHTTPHeaderPropagator creates a combined Injector and Extractor for HTTPHeaders format +func NewHTTPHeaderPropagator(headerKeys *HeadersConfig, metrics Metrics) *TextMapPropagator { + return &TextMapPropagator{ headerKeys: headerKeys, metrics: metrics, encodeValue: func(val string) string { @@ -88,19 +91,22 @@ func newHTTPHeaderPropagator(headerKeys *HeadersConfig, metrics Metrics) *textMa } } -type binaryPropagator struct { +// BinaryPropagator is a combined Injector and Extractor for Binary format +type BinaryPropagator struct { tracer *Tracer buffers sync.Pool } -func newBinaryPropagator(tracer *Tracer) *binaryPropagator { - return &binaryPropagator{ +// NewBinaryPropagator creates a combined Injector and Extractor for Binary format +func NewBinaryPropagator(tracer *Tracer) *BinaryPropagator { + return &BinaryPropagator{ tracer: tracer, buffers: sync.Pool{New: func() interface{} { return &bytes.Buffer{} }}, } } -func (p *textMapPropagator) Inject( +// Inject implements Injector of TextMapPropagator +func (p *TextMapPropagator) Inject( sc SpanContext, abstractCarrier interface{}, ) error { @@ -121,7 +127,8 @@ func (p *textMapPropagator) Inject( return nil } -func (p *textMapPropagator) Extract(abstractCarrier interface{}) (SpanContext, error) { +// Extract implements Extractor of TextMapPropagator +func (p *TextMapPropagator) Extract(abstractCarrier interface{}) (SpanContext, error) { textMapReader, ok := abstractCarrier.(opentracing.TextMapReader) if !ok { return emptyContext, opentracing.ErrInvalidCarrier @@ -166,7 +173,8 @@ func (p *textMapPropagator) Extract(abstractCarrier interface{}) (SpanContext, e return ctx, nil } -func (p *binaryPropagator) Inject( +// Inject implements Injector of BinaryPropagator +func (p *BinaryPropagator) Inject( sc SpanContext, abstractCarrier interface{}, ) error { @@ -207,7 +215,8 @@ func (p *binaryPropagator) Inject( return nil } -func (p *binaryPropagator) Extract(abstractCarrier interface{}) (SpanContext, error) { +// Extract implements Extractor of BinaryPropagator +func (p *BinaryPropagator) Extract(abstractCarrier interface{}) (SpanContext, error) { carrier, ok := abstractCarrier.(io.Reader) if !ok { return emptyContext, opentracing.ErrInvalidCarrier @@ -269,7 +278,7 @@ func (p *binaryPropagator) Extract(abstractCarrier interface{}) (SpanContext, er // is converted to map[string]string { "key1" : "value1", // "key2" : "value2", // "key3" : "value3" } -func (p *textMapPropagator) parseCommaSeparatedMap(value string) map[string]string { +func (p *TextMapPropagator) parseCommaSeparatedMap(value string) map[string]string { baggage := make(map[string]string) value, err := url.QueryUnescape(value) if err != nil { @@ -289,12 +298,12 @@ func (p *textMapPropagator) parseCommaSeparatedMap(value string) map[string]stri // Converts a baggage item key into an http header format, // by prepending TraceBaggageHeaderPrefix and encoding the key string -func (p *textMapPropagator) addBaggageKeyPrefix(key string) string { +func (p *TextMapPropagator) addBaggageKeyPrefix(key string) string { // TODO encodeBaggageKeyAsHeader add caching and escaping return fmt.Sprintf("%v%v", p.headerKeys.TraceBaggageHeaderPrefix, key) } -func (p *textMapPropagator) removeBaggageKeyPrefix(key string) string { +func (p *TextMapPropagator) removeBaggageKeyPrefix(key string) string { // TODO decodeBaggageHeaderKey add caching and escaping return key[len(p.headerKeys.TraceBaggageHeaderPrefix):] } diff --git a/vendor/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/constants.go b/vendor/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/constants.go index f05144bfc..a53d46f0e 100644 --- a/vendor/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/constants.go +++ b/vendor/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/constants.go @@ -18,6 +18,8 @@ const CLIENT_SEND = "cs" const CLIENT_RECV = "cr" const SERVER_SEND = "ss" const SERVER_RECV = "sr" +const MESSAGE_SEND = "ms" +const MESSAGE_RECV = "mr" const WIRE_SEND = "ws" const WIRE_RECV = "wr" const CLIENT_SEND_FRAGMENT = "csf" @@ -27,6 +29,7 @@ const SERVER_RECV_FRAGMENT = "srf" const LOCAL_COMPONENT = "lc" const CLIENT_ADDR = "ca" const SERVER_ADDR = "sa" +const MESSAGE_ADDR = "ma" func init() { } diff --git a/vendor/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/ttypes.go b/vendor/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/ttypes.go index 34b2b267e..2d49e1d5f 100644 --- a/vendor/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/ttypes.go +++ b/vendor/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/ttypes.go @@ -103,10 +103,12 @@ func (p *AnnotationType) UnmarshalText(text []byte) error { // - ServiceName: Service name in lowercase, such as "memcache" or "zipkin-web" // // Conventionally, when the service name isn't known, service_name = "unknown". +// - Ipv6: IPv6 host address packed into 16 bytes. Ex Inet6Address.getBytes() type Endpoint struct { Ipv4 int32 `thrift:"ipv4,1" json:"ipv4"` Port int16 `thrift:"port,2" json:"port"` ServiceName string `thrift:"service_name,3" json:"service_name"` + Ipv6 []byte `thrift:"ipv6,4" json:"ipv6,omitempty"` } func NewEndpoint() *Endpoint { @@ -124,6 +126,16 @@ func (p *Endpoint) GetPort() int16 { func (p *Endpoint) GetServiceName() string { return p.ServiceName } + +var Endpoint_Ipv6_DEFAULT []byte + +func (p *Endpoint) GetIpv6() []byte { + return p.Ipv6 +} +func (p *Endpoint) IsSetIpv6() bool { + return p.Ipv6 != nil +} + func (p *Endpoint) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) @@ -150,6 +162,10 @@ func (p *Endpoint) Read(iprot thrift.TProtocol) error { if err := p.readField3(iprot); err != nil { return err } + case 4: + if err := p.readField4(iprot); err != nil { + return err + } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -192,6 +208,15 @@ func (p *Endpoint) readField3(iprot thrift.TProtocol) error { return nil } +func (p *Endpoint) readField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(); err != nil { + return thrift.PrependError("error reading field 4: ", err) + } else { + p.Ipv6 = v + } + return nil +} + func (p *Endpoint) Write(oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin("Endpoint"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) @@ -205,6 +230,9 @@ func (p *Endpoint) Write(oprot thrift.TProtocol) error { if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField4(oprot); err != nil { + return err + } if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -253,6 +281,21 @@ func (p *Endpoint) writeField3(oprot thrift.TProtocol) (err error) { return err } +func (p *Endpoint) writeField4(oprot thrift.TProtocol) (err error) { + if p.IsSetIpv6() { + if err := oprot.WriteFieldBegin("ipv6", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:ipv6: ", p), err) + } + if err := oprot.WriteBinary(p.Ipv6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.ipv6 (4) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:ipv6: ", p), err) + } + } + return err +} + func (p *Endpoint) String() string { if p == nil { return "<nil>" @@ -707,6 +750,8 @@ func (p *BinaryAnnotation) String() string { // this field non-atomically is implementation-specific. // // This field is i64 vs i32 to support spans longer than 35 minutes. +// - TraceIDHigh: Optional unique 8-byte additional identifier for a trace. If non zero, this +// means the trace uses 128 bit traceIds instead of 64 bit. type Span struct { TraceID int64 `thrift:"trace_id,1" json:"trace_id"` // unused field # 2 @@ -719,6 +764,7 @@ type Span struct { Debug bool `thrift:"debug,9" json:"debug,omitempty"` Timestamp *int64 `thrift:"timestamp,10" json:"timestamp,omitempty"` Duration *int64 `thrift:"duration,11" json:"duration,omitempty"` + TraceIDHigh *int64 `thrift:"trace_id_high,12" json:"trace_id_high,omitempty"` } func NewSpan() *Span { @@ -777,6 +823,15 @@ func (p *Span) GetDuration() int64 { } return *p.Duration } + +var Span_TraceIDHigh_DEFAULT int64 + +func (p *Span) GetTraceIDHigh() int64 { + if !p.IsSetTraceIDHigh() { + return Span_TraceIDHigh_DEFAULT + } + return *p.TraceIDHigh +} func (p *Span) IsSetParentID() bool { return p.ParentID != nil } @@ -793,6 +848,10 @@ func (p *Span) IsSetDuration() bool { return p.Duration != nil } +func (p *Span) IsSetTraceIDHigh() bool { + return p.TraceIDHigh != nil +} + func (p *Span) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) @@ -843,6 +902,10 @@ func (p *Span) Read(iprot thrift.TProtocol) error { if err := p.readField11(iprot); err != nil { return err } + case 12: + if err := p.readField12(iprot); err != nil { + return err + } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -961,6 +1024,15 @@ func (p *Span) readField11(iprot thrift.TProtocol) error { return nil } +func (p *Span) readField12(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { + return thrift.PrependError("error reading field 12: ", err) + } else { + p.TraceIDHigh = &v + } + return nil +} + func (p *Span) Write(oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin("Span"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) @@ -992,6 +1064,9 @@ func (p *Span) Write(oprot thrift.TProtocol) error { if err := p.writeField11(oprot); err != nil { return err } + if err := p.writeField12(oprot); err != nil { + return err + } if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -1142,6 +1217,21 @@ func (p *Span) writeField11(oprot thrift.TProtocol) (err error) { return err } +func (p *Span) writeField12(oprot thrift.TProtocol) (err error) { + if p.IsSetTraceIDHigh() { + if err := oprot.WriteFieldBegin("trace_id_high", thrift.I64, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:trace_id_high: ", p), err) + } + if err := oprot.WriteI64(int64(*p.TraceIDHigh)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.trace_id_high (12) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:trace_id_high: ", p), err) + } + } + return err +} + func (p *Span) String() string { if p == nil { return "<nil>" diff --git a/vendor/github.com/uber/jaeger-client-go/tracer.go b/vendor/github.com/uber/jaeger-client-go/tracer.go index 2c29ae8c9..d87fb10be 100644 --- a/vendor/github.com/uber/jaeger-client-go/tracer.go +++ b/vendor/github.com/uber/jaeger-client-go/tracer.go @@ -97,13 +97,13 @@ func NewTracer( } // register default injectors/extractors unless they are already provided via options - textPropagator := newTextMapPropagator(getDefaultHeadersConfig(), t.metrics) + textPropagator := NewTextMapPropagator(getDefaultHeadersConfig(), t.metrics) t.addCodec(opentracing.TextMap, textPropagator, textPropagator) - httpHeaderPropagator := newHTTPHeaderPropagator(getDefaultHeadersConfig(), t.metrics) + httpHeaderPropagator := NewHTTPHeaderPropagator(getDefaultHeadersConfig(), t.metrics) t.addCodec(opentracing.HTTPHeaders, httpHeaderPropagator, httpHeaderPropagator) - binaryPropagator := newBinaryPropagator(t) + binaryPropagator := NewBinaryPropagator(t) t.addCodec(opentracing.Binary, binaryPropagator, binaryPropagator) // TODO remove after TChannel supports OpenTracing @@ -319,7 +319,11 @@ func (t *Tracer) Extract( carrier interface{}, ) (opentracing.SpanContext, error) { if extractor, ok := t.extractors[format]; ok { - return extractor.Extract(carrier) + spanCtx, err := extractor.Extract(carrier) + if err != nil { + return nil, err // ensure returned spanCtx is nil + } + return spanCtx, nil } return nil, opentracing.ErrUnsupportedFormat } diff --git a/vendor/github.com/uber/jaeger-client-go/tracer_options.go b/vendor/github.com/uber/jaeger-client-go/tracer_options.go index a90265f03..b4176cc72 100644 --- a/vendor/github.com/uber/jaeger-client-go/tracer_options.go +++ b/vendor/github.com/uber/jaeger-client-go/tracer_options.go @@ -51,10 +51,10 @@ func (tracerOptions) CustomHeaderKeys(headerKeys *HeadersConfig) TracerOption { if headerKeys == nil { return } - textPropagator := newTextMapPropagator(headerKeys.applyDefaults(), tracer.metrics) + textPropagator := NewTextMapPropagator(headerKeys.ApplyDefaults(), tracer.metrics) tracer.addCodec(opentracing.TextMap, textPropagator, textPropagator) - httpHeaderPropagator := newHTTPHeaderPropagator(headerKeys.applyDefaults(), tracer.metrics) + httpHeaderPropagator := NewHTTPHeaderPropagator(headerKeys.ApplyDefaults(), tracer.metrics) tracer.addCodec(opentracing.HTTPHeaders, httpHeaderPropagator, httpHeaderPropagator) } } diff --git a/vendor/github.com/uber/jaeger-client-go/zipkin_thrift_span.go b/vendor/github.com/uber/jaeger-client-go/zipkin_thrift_span.go index dce58b433..eb31c4369 100644 --- a/vendor/github.com/uber/jaeger-client-go/zipkin_thrift_span.go +++ b/vendor/github.com/uber/jaeger-client-go/zipkin_thrift_span.go @@ -48,13 +48,19 @@ func BuildZipkinThrift(s *Span) *z.Span { if parentID != 0 { ptrParentID = &parentID } + traceIDHigh := int64(span.context.traceID.High) + var ptrTraceIDHigh *int64 + if traceIDHigh != 0 { + ptrTraceIDHigh = &traceIDHigh + } timestamp := utils.TimeToMicrosecondsSinceEpochInt64(span.startTime) duration := span.duration.Nanoseconds() / int64(time.Microsecond) endpoint := &z.Endpoint{ ServiceName: span.tracer.serviceName, Ipv4: int32(span.tracer.hostIPv4)} thriftSpan := &z.Span{ - TraceID: int64(span.context.traceID.Low), // TODO upgrade zipkin thrift and use TraceIdHigh + TraceID: int64(span.context.traceID.Low), + TraceIDHigh: ptrTraceIDHigh, ID: int64(span.context.spanID), ParentID: ptrParentID, Name: span.operationName, |