diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-15 10:36:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 10:36:44 -0400 |
commit | 4fe573edfc47a42c7e587311adc21a49eac23424 (patch) | |
tree | 635b7d84cc4b5f60cbb8df9a89f32b0b589f2815 /vendor/github.com/uber/jaeger-client-go | |
parent | 230cd2525f110d507c1bf2195f04649f03218c8f (diff) | |
parent | ea75042fb3784654f5ae7a1c5bb68eda450a0798 (diff) | |
download | podman-4fe573edfc47a42c7e587311adc21a49eac23424.tar.gz podman-4fe573edfc47a42c7e587311adc21a49eac23424.tar.bz2 podman-4fe573edfc47a42c7e587311adc21a49eac23424.zip |
Merge pull request #6606 from containers/dependabot/go_modules/github.com/uber/jaeger-client-go-2.24.0incompatible
Bump github.com/uber/jaeger-client-go from 2.23.1+incompatible to 2.24.0+incompatible
Diffstat (limited to 'vendor/github.com/uber/jaeger-client-go')
8 files changed, 79 insertions, 56 deletions
diff --git a/vendor/github.com/uber/jaeger-client-go/.travis.yml b/vendor/github.com/uber/jaeger-client-go/.travis.yml index e81cc8805..f9c9a7776 100644 --- a/vendor/github.com/uber/jaeger-client-go/.travis.yml +++ b/vendor/github.com/uber/jaeger-client-go/.travis.yml @@ -7,22 +7,22 @@ dist: trusty matrix: include: - - go: 1.13.x + - go: 1.14.x env: - TESTS=true - USE_DEP=true - COVERAGE=true - - go: 1.13.x + - go: 1.14.x env: - USE_DEP=true - CROSSDOCK=true - - go: 1.13.x + - go: 1.14.x env: - TESTS=true - USE_DEP=false - USE_GLIDE=true # test with previous version of Go - - go: 1.12.x + - go: 1.13.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 944feb2c8..6a7e3c5ca 100644 --- a/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md +++ b/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md @@ -1,6 +1,14 @@ Changes by Version ================== +2.24.0 (2020-06-14) +------------------- +- Mention FromEnv() in the README, docs, and examples (#518) -- Martin Lercher +- Serialize access to RemotelyControlledSampler.sampler (#515) -- Dima +- Override reporter config only when agent host/port is set in env (#513) -- ilylia +- Converge on JAEGER_SAMPLING_ENDPOINT env variable (#511) -- Eundoo Song + + 2.23.1 (2020-04-28) ------------------- - Fix regression by handling nil logger correctly ([#507](https://github.com/jaegertracing/jaeger-client-go/pull/507)) -- Prithvi Raj diff --git a/vendor/github.com/uber/jaeger-client-go/README.md b/vendor/github.com/uber/jaeger-client-go/README.md index 7c348e73a..e7b13b1c2 100644 --- a/vendor/github.com/uber/jaeger-client-go/README.md +++ b/vendor/github.com/uber/jaeger-client-go/README.md @@ -44,28 +44,32 @@ and [config/example_test.go](./config/example_test.go). ### Environment variables -The tracer can be initialized with values coming from environment variables. None of the env vars are required -and all of them can be overridden via direct setting of the property on the configuration object. +The tracer can be initialized with values coming from environment variables, if it is +[built from a config](https://pkg.go.dev/github.com/uber/jaeger-client-go/config?tab=doc#Configuration.NewTracer) +that was created via [FromEnv()](https://pkg.go.dev/github.com/uber/jaeger-client-go/config?tab=doc#FromEnv). +None of the env vars are required and all of them can be overridden via direct setting +of the property on the configuration object. Property| Description --- | --- -JAEGER_SERVICE_NAME | The service name -JAEGER_AGENT_HOST | The hostname for communicating with agent via UDP -JAEGER_AGENT_PORT | The port for communicating with agent via UDP -JAEGER_ENDPOINT | The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces -JAEGER_USER | Username to send as part of "Basic" authentication to the collector endpoint -JAEGER_PASSWORD | Password to send as part of "Basic" authentication to the collector endpoint -JAEGER_REPORTER_LOG_SPANS | Whether the reporter should also log the spans -JAEGER_REPORTER_MAX_QUEUE_SIZE | The reporter's maximum queue size -JAEGER_REPORTER_FLUSH_INTERVAL | The reporter's flush interval, with units, e.g. "500ms" or "2s" ([valid units][timeunits]) -JAEGER_SAMPLER_TYPE | The sampler type -JAEGER_SAMPLER_PARAM | The sampler parameter (number) -JAEGER_SAMPLER_MANAGER_HOST_PORT | The HTTP endpoint when using the remote sampler, i.e. http://jaeger-agent:5778/sampling -JAEGER_SAMPLER_MAX_OPERATIONS | The maximum number of operations that the sampler will keep track of -JAEGER_SAMPLER_REFRESH_INTERVAL | How often the remotely controlled sampler will poll jaeger-agent for the appropriate sampling strategy, with units, e.g. "1m" or "30s" ([valid units][timeunits]) -JAEGER_TAGS | A comma separated list of `name = value` tracer level tags, which get added to all reported spans. The value can also refer to an environment variable using the format `${envVarName:default}`, where the `:default` is optional, and identifies a value to be used if the environment variable cannot be found -JAEGER_DISABLED | Whether the tracer is disabled or not. If true, the default `opentracing.NoopTracer` is used. -JAEGER_RPC_METRICS | Whether to store RPC metrics +JAEGER_SERVICE_NAME | The service name. +JAEGER_AGENT_HOST | The hostname for communicating with agent via UDP (default `localhost`). +JAEGER_AGENT_PORT | The port for communicating with agent via UDP (default `6831`). +JAEGER_ENDPOINT | The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. If specified, the agent host/port are ignored. +JAEGER_USER | Username to send as part of "Basic" authentication to the collector endpoint. +JAEGER_PASSWORD | Password to send as part of "Basic" authentication to the collector endpoint. +JAEGER_REPORTER_LOG_SPANS | Whether the reporter should also log the spans" `true` or `false` (default `false`). +JAEGER_REPORTER_MAX_QUEUE_SIZE | The reporter's maximum queue size (default `100`). +JAEGER_REPORTER_FLUSH_INTERVAL | The reporter's flush interval, with units, e.g. `500ms` or `2s` ([valid units][timeunits]; default `1s`). +JAEGER_SAMPLER_TYPE | The sampler type: `remote`, `const`, `probabilistic`, `ratelimiting` (default `remote`). See also https://www.jaegertracing.io/docs/latest/sampling/. +JAEGER_SAMPLER_PARAM | The sampler parameter (number). +JAEGER_SAMPLER_MANAGER_HOST_PORT | (deprecated) The HTTP endpoint when using the `remote` sampler. +JAEGER_SAMPLING_ENDPOINT | The URL for the sampling configuration server when using sampler type `remote` (default `http://127.0.0.1:5778/sampling`). +JAEGER_SAMPLER_MAX_OPERATIONS | The maximum number of operations that the sampler will keep track of (default `2000`). +JAEGER_SAMPLER_REFRESH_INTERVAL | How often the `remote` sampler should poll the configuration server for the appropriate sampling strategy, e.g. "1m" or "30s" ([valid units][timeunits]; default `1m`). +JAEGER_TAGS | A comma separated list of `name=value` tracer-level tags, which get added to all reported spans. The value can also refer to an environment variable using the format `${envVarName:defaultValue}`. +JAEGER_DISABLED | Whether the tracer is disabled or not. If `true`, the `opentracing.NoopTracer` is used (default `false`). +JAEGER_RPC_METRICS | Whether to store RPC metrics, `true` or `false` (default `false`). By default, the client sends traces via UDP to the agent at `localhost:6831`. Use `JAEGER_AGENT_HOST` and `JAEGER_AGENT_PORT` to send UDP traces to a different `host:port`. If `JAEGER_ENDPOINT` is set, the client sends traces diff --git a/vendor/github.com/uber/jaeger-client-go/RELEASE.md b/vendor/github.com/uber/jaeger-client-go/RELEASE.md index 115e49ab8..12438d841 100644 --- a/vendor/github.com/uber/jaeger-client-go/RELEASE.md +++ b/vendor/github.com/uber/jaeger-client-go/RELEASE.md @@ -2,6 +2,7 @@ 1. Create a PR "Preparing for release X.Y.Z" against master branch * Alter CHANGELOG.md from `<placeholder_version> (unreleased)` to `<X.Y.Z> (YYYY-MM-DD)` + * Use `git log --pretty=format:'- %s -- %an'` as the basis for for changelog entries * Update `JaegerClientVersion` in constants.go to `Go-X.Y.Z` 2. Create a release "Release X.Y.Z" on Github * Create Tag `vX.Y.Z` 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 44e93533c..e6ffb987d 100644 --- a/vendor/github.com/uber/jaeger-client-go/config/config.go +++ b/vendor/github.com/uber/jaeger-client-go/config/config.go @@ -36,16 +36,16 @@ const defaultSamplingProbability = 0.001 // Configuration configures and creates Jaeger Tracer type Configuration struct { // ServiceName specifies the service name to use on the tracer. - // Can be provided via environment variable named JAEGER_SERVICE_NAME + // Can be provided by FromEnv() via the environment variable named JAEGER_SERVICE_NAME ServiceName string `yaml:"serviceName"` - // Disabled can be provided via environment variable named JAEGER_DISABLED + // Disabled can be provided by FromEnv() via the environment variable named JAEGER_DISABLED Disabled bool `yaml:"disabled"` - // RPCMetrics can be provided via environment variable named JAEGER_RPC_METRICS + // RPCMetrics can be provided by FromEnv() via the environment variable named JAEGER_RPC_METRICS RPCMetrics bool `yaml:"rpc_metrics"` - // Tags can be provided via environment variable named JAEGER_TAGS + // Tags can be provided by FromEnv() via the environment variable named JAEGER_TAGS Tags []opentracing.Tag `yaml:"tags"` Sampler *SamplerConfig `yaml:"sampler"` @@ -57,8 +57,8 @@ type Configuration struct { // SamplerConfig allows initializing a non-default sampler. All fields are optional. type SamplerConfig struct { - // Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote - // Can be set by exporting an environment variable named JAEGER_SAMPLER_TYPE + // Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote. + // Can be provided by FromEnv() via the environment variable named JAEGER_SAMPLER_TYPE Type string `yaml:"type"` // Param is a value passed to the sampler. @@ -69,22 +69,23 @@ type SamplerConfig struct { // - for "remote" sampler, param is the same as for "probabilistic" // and indicates the initial sampling rate before the actual one // is received from the mothership. - // Can be set by exporting an environment variable named JAEGER_SAMPLER_PARAM + // Can be provided by FromEnv() via the environment variable named JAEGER_SAMPLER_PARAM Param float64 `yaml:"param"` - // SamplingServerURL is the address of jaeger-agent's HTTP sampling server - // Can be set by exporting an environment variable named JAEGER_SAMPLER_MANAGER_HOST_PORT + // SamplingServerURL is the URL of sampling manager that can provide + // sampling strategy to this service. + // Can be provided by FromEnv() via the environment variable named JAEGER_SAMPLING_ENDPOINT SamplingServerURL string `yaml:"samplingServerURL"` // SamplingRefreshInterval controls how often the remotely controlled sampler will poll - // jaeger-agent for the appropriate sampling strategy. - // Can be set by exporting an environment variable named JAEGER_SAMPLER_REFRESH_INTERVAL + // sampling manager for the appropriate sampling strategy. + // Can be provided by FromEnv() via the environment variable named JAEGER_SAMPLER_REFRESH_INTERVAL SamplingRefreshInterval time.Duration `yaml:"samplingRefreshInterval"` // MaxOperations is the maximum number of operations that the PerOperationSampler // will keep track of. If an operation is not tracked, a default probabilistic // sampler will be used rather than the per operation specific sampler. - // Can be set by exporting an environment variable named JAEGER_SAMPLER_MAX_OPERATIONS. + // Can be provided by FromEnv() via the environment variable named JAEGER_SAMPLER_MAX_OPERATIONS. MaxOperations int `yaml:"maxOperations"` // Opt-in feature for applications that require late binding of span name via explicit @@ -105,34 +106,35 @@ type ReporterConfig struct { // QueueSize controls how many spans the reporter can keep in memory before it starts dropping // new spans. The queue is continuously drained by a background go-routine, as fast as spans // can be sent out of process. - // Can be set by exporting an environment variable named JAEGER_REPORTER_MAX_QUEUE_SIZE + // Can be provided by FromEnv() via the environment variable named JAEGER_REPORTER_MAX_QUEUE_SIZE QueueSize int `yaml:"queueSize"` // BufferFlushInterval controls how often the buffer is force-flushed, even if it's not full. // It is generally not useful, as it only matters for very low traffic services. - // Can be set by exporting an environment variable named JAEGER_REPORTER_FLUSH_INTERVAL + // Can be provided by FromEnv() via the environment variable named JAEGER_REPORTER_FLUSH_INTERVAL BufferFlushInterval time.Duration // LogSpans, when true, enables LoggingReporter that runs in parallel with the main reporter // and logs all submitted spans. Main Configuration.Logger must be initialized in the code // for this option to have any effect. - // Can be set by exporting an environment variable named JAEGER_REPORTER_LOG_SPANS + // Can be provided by FromEnv() via the environment variable named JAEGER_REPORTER_LOG_SPANS LogSpans bool `yaml:"logSpans"` - // LocalAgentHostPort instructs reporter to send spans to jaeger-agent at this address - // Can be set by exporting an environment variable named JAEGER_AGENT_HOST / JAEGER_AGENT_PORT + // LocalAgentHostPort instructs reporter to send spans to jaeger-agent at this address. + // Can be provided by FromEnv() via the environment variable named JAEGER_AGENT_HOST / JAEGER_AGENT_PORT LocalAgentHostPort string `yaml:"localAgentHostPort"` - // CollectorEndpoint instructs reporter to send spans to jaeger-collector at this URL - // Can be set by exporting an environment variable named JAEGER_ENDPOINT + // CollectorEndpoint instructs reporter to send spans to jaeger-collector at this URL. + // Can be provided by FromEnv() via the environment variable named JAEGER_ENDPOINT CollectorEndpoint string `yaml:"collectorEndpoint"` // User instructs reporter to include a user for basic http authentication when sending spans to jaeger-collector. - // Can be set by exporting an environment variable named JAEGER_USER + // Can be provided by FromEnv() via the environment variable named JAEGER_USER User string `yaml:"user"` // Password instructs reporter to include a password for basic http authentication when sending spans to - // jaeger-collector. Can be set by exporting an environment variable named JAEGER_PASSWORD + // jaeger-collector. + // Can be provided by FromEnv() via the environment variable named JAEGER_PASSWORD Password string `yaml:"password"` // HTTPHeaders instructs the reporter to add these headers to the http request when reporting spans. diff --git a/vendor/github.com/uber/jaeger-client-go/config/config_env.go b/vendor/github.com/uber/jaeger-client-go/config/config_env.go index a729bd8fe..f38eb9d93 100644 --- a/vendor/github.com/uber/jaeger-client-go/config/config_env.go +++ b/vendor/github.com/uber/jaeger-client-go/config/config_env.go @@ -36,7 +36,8 @@ const ( envTags = "JAEGER_TAGS" envSamplerType = "JAEGER_SAMPLER_TYPE" envSamplerParam = "JAEGER_SAMPLER_PARAM" - envSamplerManagerHostPort = "JAEGER_SAMPLER_MANAGER_HOST_PORT" + envSamplerManagerHostPort = "JAEGER_SAMPLER_MANAGER_HOST_PORT" // Deprecated by envSamplingEndpoint + envSamplingEndpoint = "JAEGER_SAMPLING_ENDPOINT" envSamplerMaxOperations = "JAEGER_SAMPLER_MAX_OPERATIONS" envSamplerRefreshInterval = "JAEGER_SAMPLER_REFRESH_INTERVAL" envReporterMaxQueueSize = "JAEGER_REPORTER_MAX_QUEUE_SIZE" @@ -118,7 +119,9 @@ func (sc *SamplerConfig) samplerConfigFromEnv() (*SamplerConfig, error) { } } - if e := os.Getenv(envSamplerManagerHostPort); e != "" { + if e := os.Getenv(envSamplingEndpoint); e != "" { + sc.SamplingServerURL = e + } else if e := os.Getenv(envSamplerManagerHostPort); e != "" { sc.SamplingServerURL = e } else if e := os.Getenv(envAgentHost); e != "" { // Fallback if we know the agent host - try the sampling endpoint there @@ -184,20 +187,25 @@ func (rc *ReporterConfig) reporterConfigFromEnv() (*ReporterConfig, error) { rc.User = user rc.Password = pswd } else { + useEnv := false host := jaeger.DefaultUDPSpanServerHost if e := os.Getenv(envAgentHost); e != "" { host = e + useEnv = true } port := jaeger.DefaultUDPSpanServerPort if e := os.Getenv(envAgentPort); e != "" { if value, err := strconv.ParseInt(e, 10, 0); err == nil { port = int(value) + useEnv = true } else { return nil, errors.Wrapf(err, "cannot parse env var %s=%s", envAgentPort, e) } } - rc.LocalAgentHostPort = fmt.Sprintf("%s:%d", host, port) + if useEnv || rc.LocalAgentHostPort == "" { + rc.LocalAgentHostPort = fmt.Sprintf("%s:%d", host, port) + } } return rc, nil diff --git a/vendor/github.com/uber/jaeger-client-go/constants.go b/vendor/github.com/uber/jaeger-client-go/constants.go index 1f8578fbd..feaf344ad 100644 --- a/vendor/github.com/uber/jaeger-client-go/constants.go +++ b/vendor/github.com/uber/jaeger-client-go/constants.go @@ -22,7 +22,7 @@ import ( const ( // JaegerClientVersion is the version of the client library reported as Span tag. - JaegerClientVersion = "Go-2.23.1" + JaegerClientVersion = "Go-2.24.0" // JaegerClientVersionTagKey is the name of the tag used to report client version. JaegerClientVersionTagKey = "jaeger.version" @@ -102,5 +102,5 @@ const ( var ( // DefaultSamplingServerURL is the default url to fetch sampling config from, via http - DefaultSamplingServerURL = fmt.Sprintf("http://localhost:%d/sampling", DefaultSamplingServerPort) + DefaultSamplingServerURL = fmt.Sprintf("http://127.0.0.1:%d/sampling", DefaultSamplingServerPort) ) diff --git a/vendor/github.com/uber/jaeger-client-go/sampler_remote.go b/vendor/github.com/uber/jaeger-client-go/sampler_remote.go index 112e3e1cb..f2edd5ca9 100644 --- a/vendor/github.com/uber/jaeger-client-go/sampler_remote.go +++ b/vendor/github.com/uber/jaeger-client-go/sampler_remote.go @@ -64,7 +64,7 @@ type RemotelyControlledSampler struct { // Cf. https://github.com/uber/jaeger-client-go/issues/155, https://goo.gl/zW7dgq closed int64 // 0 - not closed, 1 - closed - sync.RWMutex + sync.RWMutex // used to serialize access to samplerOptions.sampler samplerOptions serviceName string @@ -95,22 +95,22 @@ func (s *RemotelyControlledSampler) IsSampled(id TraceID, operation string) (boo // OnCreateSpan implements OnCreateSpan of SamplerV2. func (s *RemotelyControlledSampler) OnCreateSpan(span *Span) SamplingDecision { - return s.sampler.OnCreateSpan(span) + return s.Sampler().OnCreateSpan(span) } // OnSetOperationName implements OnSetOperationName of SamplerV2. func (s *RemotelyControlledSampler) OnSetOperationName(span *Span, operationName string) SamplingDecision { - return s.sampler.OnSetOperationName(span, operationName) + return s.Sampler().OnSetOperationName(span, operationName) } // OnSetTag implements OnSetTag of SamplerV2. func (s *RemotelyControlledSampler) OnSetTag(span *Span, key string, value interface{}) SamplingDecision { - return s.sampler.OnSetTag(span, key, value) + return s.Sampler().OnSetTag(span, key, value) } // OnFinishSpan implements OnFinishSpan of SamplerV2. func (s *RemotelyControlledSampler) OnFinishSpan(span *Span) SamplingDecision { - return s.sampler.OnFinishSpan(span) + return s.Sampler().OnFinishSpan(span) } // Close implements Close() of Sampler. @@ -153,8 +153,8 @@ func (s *RemotelyControlledSampler) pollControllerWithTicker(ticker *time.Ticker // Sampler returns the currently active sampler. func (s *RemotelyControlledSampler) Sampler() SamplerV2 { - s.Lock() - defer s.Unlock() + s.RLock() + defer s.RUnlock() return s.sampler } |