pkg/tracing: LogrusHook.Fire: micro-optimisation
Check span.IsRecording first, as it's a more lightweight check than span.SpanContext().IsValid() Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
		@@ -59,7 +59,7 @@ func (h *LogrusHook) Fire(entry *log.Entry) error {
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if !span.SpanContext().IsValid() || !span.IsRecording() {
 | 
			
		||||
	if !span.IsRecording() || !span.SpanContext().IsValid() {
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user