Skip to content

Commit 8574f4c

Browse files
committed
Remove conditional we longer need
1 parent 267b822 commit 8574f4c

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

lib/sentry/opentelemetry/span_processor.ex

+10-14
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,16 @@ defmodule Sentry.OpenTelemetry.SpanProcessor do
3333
transaction = build_transaction(root_span_record, child_span_records)
3434

3535
result =
36-
if transaction do
37-
case Sentry.send_transaction(transaction) do
38-
{:ok, _id} ->
39-
true
40-
41-
:ignored ->
42-
true
43-
44-
{:error, error} ->
45-
Logger.error("Failed to send transaction to Sentry: #{inspect(error)}")
46-
{:error, :invalid_span}
47-
end
48-
else
49-
true
36+
case Sentry.send_transaction(transaction) do
37+
{:ok, _id} ->
38+
true
39+
40+
:ignored ->
41+
true
42+
43+
{:error, error} ->
44+
Logger.error("Failed to send transaction to Sentry: #{inspect(error)}")
45+
{:error, :invalid_span}
5046
end
5147

5248
:ok = SpanStorage.remove_span(span_record.span_id)

0 commit comments

Comments
 (0)