fix review comments.

This commit is contained in:
rahulpa 2019-01-09 14:59:27 -08:00
parent efae93101c
commit ed03e4086e

View file

@ -131,15 +131,7 @@ func initStats(exporter *stackdriver.Exporter) {
}
}
func initTracing() {
// This is a demo app with low QPS. trace.AlwaysSample() is used here
// to make sure traces are available for observation and analysis.
// In a production environment or high QPS setup please use
// trace.ProbabilitySampler set at the desired probability.
trace.ApplyConfig(trace.Config{DefaultSampler: trace.AlwaysSample()})
initJaegerTracing()
func initStackDriverTracing() {
// TODO(ahmetb) this method is duplicated in other microservices using Go
// since they are not sharing packages.
for i := 1; i <= 3; i++ {
@ -161,6 +153,11 @@ func initTracing() {
log.Warn("could not initialize stackdriver exporter after retrying, giving up")
}
func initTracing() {
initJaegerTracing()
initStackDriverTracing()
}
func initProfiling(service, version string) {
// TODO(ahmetb) this method is duplicated in other microservices using Go
// since they are not sharing packages.