-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add sampling handler to main #720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
CMD ["/go/bin/standalone-linux","--query.static-files=/go/src/jaeger-ui-build/build/"] | ||
CMD ["/go/bin/standalone-linux","--query.static-files=/go/src/jaeger-ui-build/build/","--sampling.strategies-file=/go/src/config/sampling_strategies.json"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standalone will be provided with a sampling strategies file which defaults the sampling probability to 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clever
@@ -58,7 +62,10 @@ func main() { | |||
if err != nil { | |||
log.Fatalf("Cannot initialize storage factory: %v", err) | |||
} | |||
|
|||
strategyStoreFactory, err := ss.NewFactory(ss.FactoryConfigFromEnv()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a breaking change. If no Env is provided, we default to using the default probability of 0.001 (all client's remote controlled samplers default to using 0.001 if it can't contact the collector...)
Do we want to have no default and not initialize a handler if Env is not provided and have users manually enable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, how is it "breaking"? Sounds like you're saying the effect of no Env will be the same - 0.001
@@ -58,7 +62,10 @@ func main() { | |||
if err != nil { | |||
log.Fatalf("Cannot initialize storage factory: %v", err) | |||
} | |||
|
|||
strategyStoreFactory, err := ss.NewFactory(ss.FactoryConfigFromEnv()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, how is it "breaking"? Sounds like you're saying the effect of no Env will be the same - 0.001
cmd/collector/main.go
Outdated
samplingStrategyStoreFactory *ss.Factory, | ||
v *viper.Viper, | ||
logger *zap.Logger, | ||
metricsFactory metrics.Factory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep the arg order consistent with Initialize(metricsFactory, logger)
?
|
||
CMD ["/go/bin/standalone-linux","--query.static-files=/go/src/jaeger-ui-build/build/"] | ||
CMD ["/go/bin/standalone-linux","--query.static-files=/go/src/jaeger-ui-build/build/","--sampling.strategies-file=/go/src/config/sampling_strategies.json"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clever
Signed-off-by: Won Jun Jang <wjang@uber.com>
Signed-off-by: Won Jun Jang <wjang@uber.com>
Signed-off-by: Won Jun Jang <wjang@uber.com>
Signed-off-by: Won Jun Jang <wjang@uber.com>
Signed-off-by: Won Jun Jang <wjang@uber.com>
6331a4d
to
b9ed439
Compare
resp, err := httpClient.Do(req) | ||
require.NoError(t, err) | ||
|
||
body, _ := ioutil.ReadAll(resp.Body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require.NoError(t, err)
@@ -11,7 +11,7 @@ make build-all-in-one-linux | |||
export REPO=jaegertracing/all-in-one | |||
|
|||
docker build -f cmd/standalone/Dockerfile -t $REPO:latest . | |||
export CID=$(docker run -d -p 16686:16686 $REPO:latest) | |||
export CID=$(docker run -d -p 16686:16686 -p 5778:5778 $REPO:latest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seriously... how did this ever work then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test uses the query service's instrumentation to create debug traces so it never needed agent's udp ports.
No description provided.