fix prealloc in trace (#1558)
This commit is contained in:
parent
e25ab9f4ca
commit
e55c23164a
@ -24,7 +24,7 @@ func (t *Tracer) Read(opts ...trace.ReadOption) ([]*trace.Span, error) {
|
|||||||
|
|
||||||
sp := t.buffer.Get(t.buffer.Size())
|
sp := t.buffer.Get(t.buffer.Size())
|
||||||
|
|
||||||
var spans []*trace.Span
|
spans := make([]*trace.Span, 0, len(sp))
|
||||||
|
|
||||||
for _, span := range sp {
|
for _, span := range sp {
|
||||||
val := span.Value.(*trace.Span)
|
val := span.Value.(*trace.Span)
|
||||||
|
Loading…
Reference in New Issue
Block a user