From 8b465803c5f671b9eed0372af6a9cca64e1bf69a Mon Sep 17 00:00:00 2001 From: Oscar Reyes Date: Mon, 30 Sep 2024 08:51:24 -0600 Subject: [PATCH] cleanup --- cli/config/config.go | 17 ++++++++--------- server/traces/trace_entities.go | 3 ++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cli/config/config.go b/cli/config/config.go index 9eabf90c98..941b0bd8e7 100644 --- a/cli/config/config.go +++ b/cli/config/config.go @@ -67,17 +67,16 @@ func (c Config) UI() string { } func (c Config) Path() string { - // pathPrefix := "/api" - // if c.ServerPath != "" { - // pathPrefix = c.ServerPath - // } + pathPrefix := "/api" + if c.ServerPath != "" { + pathPrefix = c.ServerPath + } - // if pathPrefix == "/" { - // return "" - // } + if pathPrefix == "/" { + return "" + } - // return pathPrefix - return "" + return pathPrefix } func (c Config) IsEmpty() bool { diff --git a/server/traces/trace_entities.go b/server/traces/trace_entities.go index e4cf40e7ac..38a645148d 100644 --- a/server/traces/trace_entities.go +++ b/server/traces/trace_entities.go @@ -6,6 +6,7 @@ import ( "sort" "strconv" "strings" + "time" "github.com/kubeshop/tracetest/agent/workers/trigger" "github.com/kubeshop/tracetest/server/pkg/id" @@ -117,7 +118,7 @@ func getRootSpan(allRoots []*Span) *Span { } if root == nil { - root = &Span{ID: id.NewRandGenerator().SpanID(), Name: TemporaryRootSpanName, Attributes: NewAttributes(), Children: []*Span{}} + root = &Span{ID: id.NewRandGenerator().SpanID(), StartTime: time.Now(), EndTime: time.Now(), Name: TemporaryRootSpanName, Attributes: NewAttributes(), Children: []*Span{}} } for _, span := range allRoots {