Skip to content

Commit

Permalink
Use .presence instead of `trace_parent_value.nil? || trace_parent_v…
Browse files Browse the repository at this point in the history
…alue.size == 0`
  • Loading branch information
wyhaines committed Jun 7, 2022
1 parent e5627ff commit 68cab48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/opentelemetry-api/propagation/trace_context.cr
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module OpenTelemetry
end

trace_parent_value = getter.get(carrier, TRACEPARENT_KEY)
return if trace_parent_value.nil? || trace_parent_value.size == 0
return unless trace_parent_value.presence

tp = TraceParent.from_string(trace_parent_value)
ts = {} of String => String
Expand Down

0 comments on commit 68cab48

Please sign in to comment.