diff --git a/pkg/tracegen/parameterized.go b/pkg/tracegen/parameterized.go index 437ca32..365f7f0 100644 --- a/pkg/tracegen/parameterized.go +++ b/pkg/tracegen/parameterized.go @@ -4,6 +4,7 @@ import ( "encoding/hex" "fmt" "math/rand" + "strconv" "time" "unsafe" @@ -71,7 +72,8 @@ func (g *ParameterizedGenerator) Traces() ptrace.Traces { ilss := rspan.ScopeSpans() ilss.EnsureCapacity(1) ils := ilss.AppendEmpty() - ils.Scope().SetName("k6") + ils.Scope().SetName("k6-scope-name/" + random.String(15)) + ils.Scope().SetVersion("k6-scope-version:v" + strconv.Itoa(random.IntBetween(0, 99)) + "." + strconv.Itoa(random.IntBetween(0, 99))) if te.ID == "" { te.ID = random.TraceID().String() diff --git a/pkg/tracegen/templated.go b/pkg/tracegen/templated.go index 4dc03dd..b772c01 100644 --- a/pkg/tracegen/templated.go +++ b/pkg/tracegen/templated.go @@ -4,6 +4,7 @@ import ( "fmt" "net/http" "net/url" + "strconv" "strings" "time" @@ -233,7 +234,8 @@ func (g *TemplatedGenerator) generateResourceSpans(resSpanSlice ptrace.ResourceS resSpans.Resource().Attributes().PutStr("service.name", tmpl.service) scopeSpans := resSpans.ScopeSpans().AppendEmpty() - scopeSpans.Scope().SetName("k6") + scopeSpans.Scope().SetName("k6-scope-name/" + random.String(15)) + scopeSpans.Scope().SetVersion("k6-scope-version:v" + strconv.Itoa(random.IntBetween(0, 99)) + "." + strconv.Itoa(random.IntBetween(0, 99))) return resSpans }