From 017e400b329d3045b451dfd98484e818b727b1a2 Mon Sep 17 00:00:00 2001 From: Jennie Pham Date: Wed, 27 Dec 2023 22:34:04 -0600 Subject: [PATCH] add links --- pkg/tracegen/parameterized.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/tracegen/parameterized.go b/pkg/tracegen/parameterized.go index 7d0d5d6..c5c4803 100644 --- a/pkg/tracegen/parameterized.go +++ b/pkg/tracegen/parameterized.go @@ -114,7 +114,12 @@ func (g *ParameterizedGenerator) generateSpan(t *TraceParams, dest ptrace.Span) event := span.Events().AppendEmpty() event.SetName(random.K6String(12)) event.SetTimestamp(pcommon.NewTimestampFromTime(startTime)) - event.Attributes().PutStr(random.K6String(12), random.K6String(12)) + event.Attributes().PutStr("event attribute"+random.K6String(5), random.K6String(12)) + + link := span.Links().AppendEmpty() + link.SetTraceID(traceID) + link.SetSpanID(random.SpanID()) + link.Attributes().PutStr(random.K6String(12), random.K6String(12)) status := span.Status() status.SetCode(1)