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:
parent
ccf7938126
commit
587ee80f61
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user