File tree Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments