Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Feb 20, 2025
1 parent e0db642 commit b515ee9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
}
Expand Down
14 changes: 4 additions & 10 deletions tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit b515ee9

Please sign in to comment.