func (e *fixedRateExtractor) Extract(s *pb.Span, priority sampler.SamplingPriority) (float64, bool) {
	operations, ok := e.rateByServiceAndName[strings.ToLower(s.Service)]
	if !ok {
		return 0, false
	}
	extractionRate, ok := operations[strings.ToLower(s.Name)]
	if !ok {
		return 0, false
	}
	if extractionRate > 0 && priority >= sampler.PriorityUserKeep {
		// If the span has been manually sampled, we always want to keep these events
		extractionRate = 1
	}
	return extractionRate, true
}
// Extract decides to extract an apm event from a span if its service and name have a corresponding extraction rate
// on the rateByServiceAndName map passed in the constructor. The extracted event is returned along with the associated
// extraction rate and a true value. If no extraction happened, false is returned as the third value and the others
// are invalid.
Extract decides to extract an apm event from a span if its service and name have a corresponding extraction rate
on the rateByServiceAndName map passed in the constructor. The extracted event is returned along with the associated
extraction rate and a true value. If no extraction happened, false is returned as the third value and the others
are invalid.
// Extract decides to extract an apm event from a span if its service and name have a corresponding extraction rate // on the rateByServiceAndName map passed in the constructor . The extracted event is returned along with the associated // extraction rate and a true value . If no extraction happened false is returned as the third value and the others // are invalid .
func (e *fixedRateExtractor) Extract(s *pb.Span, priority sampler.SamplingPriority) (float64, bool) {
	operations, ok := e.rateByServiceAndName[strings.ToLower(s.Service)]
	if !ok {
		return 0, false
	}
	extractionRate, ok := operations[strings.ToLower(s.Name)]
	if !ok {
		return 0, false
	}
	if extractionRate > 0 && priority >= sampler.PriorityUserKeep {
		extractionRate = 1
	}
	return extractionRate, true
}
func ( e * fixedRateExtractor ) Extract ( s * pb . Span , priority sampler . SamplingPriority ) ( float64 , bool ) { operations , ok := e . rateByServiceAndName [ strings . ToLower ( s . Service ) ] if ! ok { return 0 , false } extractionRate , ok := operations [ strings . ToLower ( s . Name ) ] if ! ok { return 0 , false } if extractionRate > 0 && priority >= sampler . PriorityUserKeep { extractionRate = 1 } return extractionRate , true }
Extract decides to extract an apm event from a span if its service and name have a corresponding extraction rate
on the rateByServiceAndName map passed in the constructor.
Extract decides to extract an apm event from a span if its service and name have a corresponding extraction rate on the rateByServiceAndName map passed in the constructor .
// If the span has been manually sampled, we always want to keep these events