go.undefinedlabs.com/scopeagent@v0.4.2/tracer/multi_recorder.go (about)

     1  package tracer
     2  
     3  type (
     4  	multiSpanRecorder struct {
     5  		recorders []SpanRecorder
     6  	}
     7  )
     8  
     9  // Create a new multi recorder
    10  func NewMultiRecorder(recorders ...SpanRecorder) SpanRecorder {
    11  	return &multiSpanRecorder{
    12  		recorders: recorders,
    13  	}
    14  }
    15  
    16  func (r *multiSpanRecorder) RecordSpan(span RawSpan) {
    17  	for idx := range r.recorders {
    18  		r.recorders[idx].RecordSpan(span)
    19  	}
    20  }