Skip to content

Commit

Permalink
Rename JAEGER_SAMPLER_MANAGER_HOST_PORT to JAEGER_CONFIG_MANAGER_HOST…
Browse files Browse the repository at this point in the history
…_PORT

Fixes: jaegertracing#282
Signed-off-by: Masroor Hasan <masroor.hasan.n@gmail.com>
  • Loading branch information
masroorhasan committed Aug 20, 2018
1 parent 252d853 commit 550b381
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -59,7 +59,8 @@ JAEGER_REPORTER_MAX_QUEUE_SIZE | The reporter's maximum queue size
JAEGER_REPORTER_FLUSH_INTERVAL | The reporter's flush interval (ms)
JAEGER_SAMPLER_TYPE | The sampler type
JAEGER_SAMPLER_PARAM | The sampler parameter (number)
JAEGER_SAMPLER_MANAGER_HOST_PORT | The host name and port when using the remote controlled sampler
JAEGER_SAMPLER_MANAGER_HOST_PORT | The host name and port when using the remote controlled sampler (deprecated, use JAEGER_CONFIG_MANAGER_HOST_PORT)
JAEGER_CONFIG_MANAGER_HOST_PORT | The host name and port when using remote sampling configuration
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
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
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Expand Up @@ -72,7 +72,7 @@ type SamplerConfig struct {
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
// Can be set by exporting an environment variable named JAEGER_CONFIG_MANAGER_HOST_PORT
SamplingServerURL string `yaml:"samplingServerURL"`

// MaxOperations is the maximum number of operations that the sampler
Expand Down
9 changes: 8 additions & 1 deletion config/config_env.go
Expand Up @@ -36,6 +36,7 @@ const (
envTags = "JAEGER_TAGS"
envSamplerType = "JAEGER_SAMPLER_TYPE"
envSamplerParam = "JAEGER_SAMPLER_PARAM"
envConfigManagerHostPort = "JAEGER_CONFIG_MANAGER_HOST_PORT"
envSamplerManagerHostPort = "JAEGER_SAMPLER_MANAGER_HOST_PORT"
envSamplerMaxOperations = "JAEGER_SAMPLER_MAX_OPERATIONS"
envSamplerRefreshInterval = "JAEGER_SAMPLER_REFRESH_INTERVAL"
Expand Down Expand Up @@ -108,8 +109,14 @@ func samplerConfigFromEnv() (*SamplerConfig, error) {
}
}

if e := os.Getenv(envSamplerManagerHostPort); e != "" {
if e := os.Getenv(envConfigManagerHostPort); e != "" {
sc.SamplingServerURL = e
} else {
// deprecated
if e = os.Getenv(envSamplerManagerHostPort); e != "" {
jaeger.StdLogger.Infof("deprecated: Please use JAEGER_CONFIG_MANAGER_HOST_PORT")
sc.SamplingServerURL = e
}
}

if e := os.Getenv(envSamplerMaxOperations); e != "" {
Expand Down

0 comments on commit 550b381

Please sign in to comment.