echo-contrib icon indicating copy to clipboard operation
echo-contrib copied to clipboard

jeager sampling doesn't work

Open alperhankendi opened this issue 6 years ago • 1 comments

here is my config. it seems the jeager tracer doesnt care my env.

JAEGER_AGENT_HOST=127.0.0.1;
JAEGER_AGENT_PORT=6831;
JAEGER_SAMPLER_PARAM=0.001;
JAEGER_SAMPLER_TYPE=const

alperhankendi avatar Dec 29 '19 14:12 alperhankendi

Probably not a problem anymore.

Just a note - Jaeger docs say

https://github.com/jaegertracing/jaeger-client-go#environment-variables

The tracer can be initialized with values coming from environment variables, if it is built from a config that was created via 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.

And this is what middleware does in New() https://github.com/labstack/echo-contrib/blob/4d116eef4725384df66e4c4d079254bc53ae2d54/jaegertracing/jaegertracing.go#L84

if middleware is NOT attached with

c := jaegertracing.New(e, nil)

then it probably does not call FromEnv

aldas avatar Sep 18 '21 19:09 aldas