Skip to content

Commit

Permalink
chore: Update condition to match upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle authored May 14, 2024
1 parent 3795ae9 commit 0171761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logs_sdk/lib/opentelemetry/sdk/logs/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def on_emit(timestamp: nil,
context: OpenTelemetry::Context.current)

current_span = OpenTelemetry::Trace.current_span(context)
span_context = OpenTelemetry::Trace::Span::INVALID != current_span ? current_span.context : nil # condition could go either way
span_context = current_span.context unless OpenTelemetry::Trace::Span::INVALID == current_span
log_record = LogRecord.new(timestamp: timestamp,
observed_timestamp: observed_timestamp,
severity_text: severity_text,
Expand Down

0 comments on commit 0171761

Please sign in to comment.