From aba57874921b05a6862e6b3e4224c3a27b8b9b85 Mon Sep 17 00:00:00 2001 From: GLVS Kiriti Date: Fri, 9 Jun 2023 02:38:24 +0530 Subject: [PATCH] Hyperlink in HotROD now finds trace results in 1st try In HotROD appbatching is not required it should export traces asap so BatchTimeOut value can be lowered from 5sec solves the issue Signed-off-by: GLVS Kiriti --- examples/hotrod/pkg/tracing/init.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/hotrod/pkg/tracing/init.go b/examples/hotrod/pkg/tracing/init.go index 112696bf756..e6dc142bdb6 100644 --- a/examples/hotrod/pkg/tracing/init.go +++ b/examples/hotrod/pkg/tracing/init.go @@ -21,6 +21,7 @@ import ( "os" "strings" "sync" + "time" "github.com/opentracing/opentracing-go" "go.opentelemetry.io/otel" @@ -62,7 +63,7 @@ func Init(serviceName string, exporterType string, metricsFactory metrics.Factor rpcmetricsObserver := rpcmetrics.NewObserver(metricsFactory, rpcmetrics.DefaultNameNormalizer) tp := sdktrace.NewTracerProvider( - sdktrace.WithBatcher(exp), + sdktrace.WithBatcher(exp, sdktrace.WithBatchTimeout(1000*time.Millisecond)), sdktrace.WithSpanProcessor(rpcmetricsObserver), sdktrace.WithResource(resource.NewWithAttributes( semconv.SchemaURL,