summaryrefslogtreecommitdiff
path: root/vendor/github.com/uber/jaeger-client-go/config/config_env.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/uber/jaeger-client-go/config/config_env.go')
-rw-r--r--vendor/github.com/uber/jaeger-client-go/config/config_env.go57
1 files changed, 38 insertions, 19 deletions
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 f38eb9d93..92d60cd59 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
@@ -24,30 +24,31 @@ import (
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
-
"github.com/uber/jaeger-client-go"
)
const (
// environment variable names
- envServiceName = "JAEGER_SERVICE_NAME"
- envDisabled = "JAEGER_DISABLED"
- envRPCMetrics = "JAEGER_RPC_METRICS"
- envTags = "JAEGER_TAGS"
- envSamplerType = "JAEGER_SAMPLER_TYPE"
- envSamplerParam = "JAEGER_SAMPLER_PARAM"
- 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"
- envReporterFlushInterval = "JAEGER_REPORTER_FLUSH_INTERVAL"
- envReporterLogSpans = "JAEGER_REPORTER_LOG_SPANS"
- envEndpoint = "JAEGER_ENDPOINT"
- envUser = "JAEGER_USER"
- envPassword = "JAEGER_PASSWORD"
- envAgentHost = "JAEGER_AGENT_HOST"
- envAgentPort = "JAEGER_AGENT_PORT"
+ envServiceName = "JAEGER_SERVICE_NAME"
+ envDisabled = "JAEGER_DISABLED"
+ envRPCMetrics = "JAEGER_RPC_METRICS"
+ envTags = "JAEGER_TAGS"
+ envSamplerType = "JAEGER_SAMPLER_TYPE"
+ envSamplerParam = "JAEGER_SAMPLER_PARAM"
+ 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"
+ envReporterFlushInterval = "JAEGER_REPORTER_FLUSH_INTERVAL"
+ envReporterLogSpans = "JAEGER_REPORTER_LOG_SPANS"
+ envReporterAttemptReconnectingDisabled = "JAEGER_REPORTER_ATTEMPT_RECONNECTING_DISABLED"
+ envReporterAttemptReconnectInterval = "JAEGER_REPORTER_ATTEMPT_RECONNECT_INTERVAL"
+ envEndpoint = "JAEGER_ENDPOINT"
+ envUser = "JAEGER_USER"
+ envPassword = "JAEGER_PASSWORD"
+ envAgentHost = "JAEGER_AGENT_HOST"
+ envAgentPort = "JAEGER_AGENT_PORT"
)
// FromEnv uses environment variables to set the tracer's Configuration
@@ -206,6 +207,24 @@ func (rc *ReporterConfig) reporterConfigFromEnv() (*ReporterConfig, error) {
if useEnv || rc.LocalAgentHostPort == "" {
rc.LocalAgentHostPort = fmt.Sprintf("%s:%d", host, port)
}
+
+ if e := os.Getenv(envReporterAttemptReconnectingDisabled); e != "" {
+ if value, err := strconv.ParseBool(e); err == nil {
+ rc.DisableAttemptReconnecting = value
+ } else {
+ return nil, errors.Wrapf(err, "cannot parse env var %s=%s", envReporterAttemptReconnectingDisabled, e)
+ }
+ }
+
+ if !rc.DisableAttemptReconnecting {
+ if e := os.Getenv(envReporterAttemptReconnectInterval); e != "" {
+ if value, err := time.ParseDuration(e); err == nil {
+ rc.AttemptReconnectInterval = value
+ } else {
+ return nil, errors.Wrapf(err, "cannot parse env var %s=%s", envReporterAttemptReconnectInterval, e)
+ }
+ }
+ }
}
return rc, nil