@@ -151,15 +151,15 @@ func (a *aggregator) HandleRootSpan(span *span_model.Span, logger *zap.Logger) {
151
151
if service == "" || span .OperationName == "" {
152
152
return
153
153
}
154
- samplerType , samplerParam := a .getSamplerParams (span )
154
+ samplerType , samplerParam := a .getSamplerParams (span , logger )
155
155
if samplerType == span_model .SamplerTypeUnrecognized {
156
156
return
157
157
}
158
158
a .RecordThroughput (service , span .OperationName , samplerType , samplerParam )
159
159
}
160
160
161
161
// GetSamplerParams returns the sampler.type and sampler.param value if they are valid.
162
- func (a * aggregator ) getSamplerParams (s * span_model.Span ) (span_model.SamplerType , float64 ) {
162
+ func (a * aggregator ) getSamplerParams (s * span_model.Span , logger * zap. Logger ) (span_model.SamplerType , float64 ) {
163
163
samplerType := s .GetSamplerType ()
164
164
if samplerType == span_model .SamplerTypeUnrecognized {
165
165
return span_model .SamplerTypeUnrecognized , 0
@@ -170,7 +170,7 @@ func (a *aggregator) getSamplerParams(s *span_model.Span) (span_model.SamplerTyp
170
170
}
171
171
samplerParam , err := samplerParamToFloat (tag )
172
172
if err != nil {
173
- a . postAggregator . logger .
173
+ logger .
174
174
With (zap .String ("traceID" , s .TraceID .String ())).
175
175
With (zap .String ("spanID" , s .SpanID .String ())).
176
176
Warn ("sampler.param tag is not a number" , zap .Any ("tag" , tag ))
0 commit comments