diff --git a/tracing.go b/tracing.go index b87f92f0..789d4c82 100644 --- a/tracing.go +++ b/tracing.go @@ -569,7 +569,6 @@ func (s *Span) toEvent() *Event { Transaction: s.Name, Contexts: contexts, Tags: s.Tags, - Extra: s.Data, Timestamp: s.EndTime, StartTime: s.StartTime, Spans: finished, @@ -588,6 +587,7 @@ func (s *Span) traceContext() *TraceContext { SpanID: s.SpanID, ParentSpanID: s.ParentSpanID, Op: s.Op, + Data: s.Data, Description: s.Description, Status: s.Status, } diff --git a/tracing_test.go b/tracing_test.go index 519b6f38..c0078dd3 100644 --- a/tracing_test.go +++ b/tracing_test.go @@ -138,15 +138,12 @@ func TestStartSpan(t *testing.T) { SpanID: span.SpanID, ParentSpanID: parentSpanID, Op: op, + Data: span.Data, Description: description, Status: status, }.Map(), }, - Tags: nil, - // TODO(tracing): the root span / transaction data field is - // mapped into Event.Extra for now, pending spec clarification. - // https://github.com/getsentry/develop/issues/244#issuecomment-778694182 - Extra: span.Data, + Tags: nil, Timestamp: endTime, StartTime: startTime, TransactionInfo: &TransactionInfo{ @@ -283,16 +280,13 @@ func TestStartTransaction(t *testing.T) { "trace": TraceContext{ TraceID: transaction.TraceID, SpanID: transaction.SpanID, + Data: transaction.Data, Description: description, Status: status, }.Map(), "otel": {"k": "v"}, }, - Tags: nil, - // TODO(tracing): the root span / transaction data field is - // mapped into Event.Extra for now, pending spec clarification. - // https://github.com/getsentry/develop/issues/244#issuecomment-778694182 - Extra: transaction.Data, + Tags: nil, Timestamp: endTime, StartTime: startTime, TransactionInfo: &TransactionInfo{