Skip to content

Commit

Permalink
Remove conditional we longer need
Browse files Browse the repository at this point in the history
  • Loading branch information
solnic committed Dec 27, 2024
1 parent 7ad38bb commit a808377
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions lib/sentry/opentelemetry/span_processor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,16 @@ defmodule Sentry.OpenTelemetry.SpanProcessor do
transaction = build_transaction(root_span_record, child_span_records)

result =
if transaction do
case Sentry.send_transaction(transaction) do
{:ok, _id} ->
true

:ignored ->
true

{:error, error} ->
Logger.error("Failed to send transaction to Sentry: #{inspect(error)}")
{:error, :invalid_span}
end
else
true
case Sentry.send_transaction(transaction) do
{:ok, _id} ->
true

:ignored ->
true

{:error, error} ->
Logger.error("Failed to send transaction to Sentry: #{inspect(error)}")
{:error, :invalid_span}
end

:ok = SpanStorage.remove_span(span_record.span_id)
Expand Down

0 comments on commit a808377

Please sign in to comment.