fix review comments.
This commit is contained in:
parent
efae93101c
commit
ed03e4086e
1 changed files with 6 additions and 9 deletions
|
@ -131,15 +131,7 @@ func initStats(exporter *stackdriver.Exporter) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func initTracing() {
|
func initStackDriverTracing() {
|
||||||
// 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()
|
|
||||||
|
|
||||||
// TODO(ahmetb) this method is duplicated in other microservices using Go
|
// TODO(ahmetb) this method is duplicated in other microservices using Go
|
||||||
// since they are not sharing packages.
|
// since they are not sharing packages.
|
||||||
for i := 1; i <= 3; i++ {
|
for i := 1; i <= 3; i++ {
|
||||||
|
@ -161,6 +153,11 @@ func initTracing() {
|
||||||
log.Warn("could not initialize stackdriver exporter after retrying, giving up")
|
log.Warn("could not initialize stackdriver exporter after retrying, giving up")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func initTracing() {
|
||||||
|
initJaegerTracing()
|
||||||
|
initStackDriverTracing()
|
||||||
|
}
|
||||||
|
|
||||||
func initProfiling(service, version string) {
|
func initProfiling(service, version string) {
|
||||||
// TODO(ahmetb) this method is duplicated in other microservices using Go
|
// TODO(ahmetb) this method is duplicated in other microservices using Go
|
||||||
// since they are not sharing packages.
|
// since they are not sharing packages.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue