summaryrefslogtreecommitdiff
path: root/vendor/github.com/uber/jaeger-client-go/config/config.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-16 17:18:10 -0400
committerGitHub <noreply@github.com>2020-07-16 17:18:10 -0400
commit0bd51819428e402599f681f273947c805f4641cf (patch)
tree094a16e8ad451916a5d9d7cb86f2788dd293ef71 /vendor/github.com/uber/jaeger-client-go/config/config.go
parent8c59e3f6e87b1c02760427897ab482fed33be0eb (diff)
parent4113d2c2986922cb3a89c9a5ca04366110d505a3 (diff)
downloadpodman-0bd51819428e402599f681f273947c805f4641cf.tar.gz
podman-0bd51819428e402599f681f273947c805f4641cf.tar.bz2
podman-0bd51819428e402599f681f273947c805f4641cf.zip
Merge pull request #6963 from containers/dependabot/go_modules/github.com/uber/jaeger-client-go-2.25.0incompatible
Bump github.com/uber/jaeger-client-go from 2.24.0+incompatible to 2.25.0+incompatible
Diffstat (limited to 'vendor/github.com/uber/jaeger-client-go/config/config.go')
-rw-r--r--vendor/github.com/uber/jaeger-client-go/config/config.go25
1 files changed, 22 insertions, 3 deletions
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 e6ffb987d..bb1228294 100644
--- a/vendor/github.com/uber/jaeger-client-go/config/config.go
+++ b/vendor/github.com/uber/jaeger-client-go/config/config.go
@@ -22,6 +22,7 @@ import (
"time"
"github.com/opentracing/opentracing-go"
+ "github.com/uber/jaeger-client-go/utils"
"github.com/uber/jaeger-client-go"
"github.com/uber/jaeger-client-go/internal/baggage/remote"
@@ -124,6 +125,17 @@ type ReporterConfig struct {
// Can be provided by FromEnv() via the environment variable named JAEGER_AGENT_HOST / JAEGER_AGENT_PORT
LocalAgentHostPort string `yaml:"localAgentHostPort"`
+ // DisableAttemptReconnecting when true, disables udp connection helper that periodically re-resolves
+ // the agent's hostname and reconnects if there was a change. This option only
+ // applies if LocalAgentHostPort is specified.
+ // Can be provided by FromEnv() via the environment variable named JAEGER_REPORTER_ATTEMPT_RECONNECTING_DISABLED
+ DisableAttemptReconnecting bool `yaml:"disableAttemptReconnecting"`
+
+ // AttemptReconnectInterval controls how often the agent client re-resolves the provided hostname
+ // in order to detect address changes. This option only applies if DisableAttemptReconnecting is false.
+ // Can be provided by FromEnv() via the environment variable named JAEGER_REPORTER_ATTEMPT_RECONNECT_INTERVAL
+ AttemptReconnectInterval time.Duration
+
// 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"`
@@ -384,7 +396,7 @@ func (rc *ReporterConfig) NewReporter(
metrics *jaeger.Metrics,
logger jaeger.Logger,
) (jaeger.Reporter, error) {
- sender, err := rc.newTransport()
+ sender, err := rc.newTransport(logger)
if err != nil {
return nil, err
}
@@ -401,7 +413,7 @@ func (rc *ReporterConfig) NewReporter(
return reporter, err
}
-func (rc *ReporterConfig) newTransport() (jaeger.Transport, error) {
+func (rc *ReporterConfig) newTransport(logger jaeger.Logger) (jaeger.Transport, error) {
switch {
case rc.CollectorEndpoint != "":
httpOptions := []transport.HTTPOption{transport.HTTPBatchSize(1), transport.HTTPHeaders(rc.HTTPHeaders)}
@@ -410,6 +422,13 @@ func (rc *ReporterConfig) newTransport() (jaeger.Transport, error) {
}
return transport.NewHTTPTransport(rc.CollectorEndpoint, httpOptions...), nil
default:
- return jaeger.NewUDPTransport(rc.LocalAgentHostPort, 0)
+ return jaeger.NewUDPTransportWithParams(jaeger.UDPTransportParams{
+ AgentClientUDPParams: utils.AgentClientUDPParams{
+ HostPort: rc.LocalAgentHostPort,
+ Logger: logger,
+ DisableAttemptReconnecting: rc.DisableAttemptReconnecting,
+ AttemptReconnectInterval: rc.AttemptReconnectInterval,
+ },
+ })
}
}