Skip to content

Commit

Permalink
avoid race (thanks andrew)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-mez committed Apr 7, 2023
1 parent 9226a57 commit f075d94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ddtrace/tracer/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,12 @@ func (s *span) finish(finishTime int64) {
// a single kept span keeps the whole trace.
s.context.trace.keep()
}
s.context.finish()
if log.DebugEnabled() {
// avoid allocating the ...interface{} argument if debug logging is disabled
log.Debug("Finished Span: %v, Operation: %s, Resource: %s, Tags: %v, %v",
s, s.Name, s.Resource, s.Meta, s.Metrics)
}
s.context.finish()
}

// newAggregableSpan creates a new summary for the span s, within an application
Expand Down

0 comments on commit f075d94

Please sign in to comment.