Skip to content

Commit

Permalink
Remove capacity argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
Baliedge committed Sep 10, 2024
1 parent e72d934 commit 0ace6ec
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tracing/deferred.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import (
//
// Note: Not thread-safe. Use in synchronous code paths only.
type DeferredTracer struct {
capacity int
spans []*DeferredSpan
spans []*DeferredSpan
}

type DeferredSpan struct {
Expand All @@ -33,13 +32,8 @@ type DeferredSpan struct {
}

// NewTracer creates a DeferredTracer instance.
// capacity is initial event array capacity used to limit extraneous array
// allocations.
func NewTracer(capacity int) *DeferredTracer {
return &DeferredTracer{
capacity: capacity,
spans: make([]*DeferredSpan, 0, capacity),
}
func NewTracer() *DeferredTracer {
return new(DeferredTracer)
}

func (t *DeferredTracer) StartSpan(opts ...trace.SpanStartOption) *DeferredSpan {
Expand Down

0 comments on commit 0ace6ec

Please sign in to comment.