Skip to content

Commit

Permalink
Make sure different tracers in HotROD process use different random ge…
Browse files Browse the repository at this point in the history
…nerator seeds

Signed-off-by: Yuri Shkuro <ys@uber.com>
  • Loading branch information
Yuri Shkuro committed Feb 28, 2018
1 parent b61b7ec commit 7cff9c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/hotrod/pkg/tracing/init.go
Expand Up @@ -37,9 +37,11 @@ func Init(serviceName string, metricsFactory metrics.Factory, logger log.Factory
Reporter: &config.ReporterConfig{
LogSpans: false,
BufferFlushInterval: 1 * time.Second,
LocalAgentHostPort: hostPort,
LocalAgentHostPort: hostPort,
},
}
// TODO(ys) a quick hack to ensure random generators get different seeds, which are based on current time.
time.Sleep(100 * time.Millisecond)
tracer, _, err := cfg.New(
serviceName,
config.Logger(jaegerLoggerAdapter{logger.Bg()}),
Expand Down

0 comments on commit 7cff9c6

Please sign in to comment.