Skip to content

Commit 9c28aa8

Browse files
committed
Address dialyzer warning (I think)
1 parent 9982d71 commit 9c28aa8

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

lib/sentry/opentelemetry/span_processor.ex

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,26 @@ defmodule Sentry.OpenTelemetry.SpanProcessor do
3232
child_span_records = SpanStorage.get_child_spans(span_record.span_id)
3333
transaction = build_transaction(root_span_record, child_span_records)
3434

35-
if transaction do
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}
35+
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
4650
end
47-
end
4851

4952
:ok = SpanStorage.remove_span(span_record.span_id)
5053

51-
true
54+
result
5255
else
5356
true
5457
end

0 commit comments

Comments
 (0)