jaegertracing/jaeger-client-go

JAEGER_REPORTER_FLUSH_INTERVAL environment variable is not working

elunlen opened this issue · 2 comments

Setting the flush interval using the environment variable JAEGER_REPORTER_FLUSH_INTERVAL is not working.
When configuring a tracer the FromEnv() function is used. A flush interval is set using environment variable JAEGER_REPORTER_FLUSH_INTERVAL but the setting is not used. The setting is still the default 1 sec. I have verified that using environment variables in general is working by for example setting JAEGER_DISABLED=true.

I then tried to set the flush interval directly by setting BufferFlushInterval directly in the ReporterConfig structure and this worked as expected.

Forgot to mention that I am using client library version2.25.0

Looking at the code here:

if e := os.Getenv(envReporterFlushInterval); e != "" {
if value, err := time.ParseDuration(e); err == nil {
rc.BufferFlushInterval = value
} else {
return nil, errors.Wrapf(err, "cannot parse env var %s=%s", envReporterFlushInterval, e)
}
}

it is hard to see a path which would go through the JAEGER_DISABLED setting and not JAEGER_REPORTER_FLUSH_INTERVAL.
Can you create an error by setting it to, say "xxx" which should fail to parse as a duration and show up as an error return?