Skip to content

Commit 2053408

Browse files
committed
Fix updating root spans in ets
1 parent 3c98d4f commit 2053408

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/sentry/opentelemetry/span_storage.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ defmodule Sentry.Opentelemetry.SpanStorage do
4545

4646
def update_span(span_data) do
4747
if span_data.parent_span_id == nil do
48-
case :ets.lookup(@table, {:root_span, span_data.parent_span_id}) do
48+
case :ets.lookup(@table, {:root_span, span_data.span_id}) do
4949
[] ->
50-
:ets.insert(@table, {{:root_span, span_data.parent_span_id}, span_data})
50+
:ets.insert(@table, {{:root_span, span_data.span_id}, span_data})
5151

5252
_ ->
53-
:ets.delete(@table, {:root_span, span_data.parent_span_id})
54-
:ets.insert(@table, {{:root_span, span_data.parent_span_id}, span_data})
53+
:ets.delete(@table, {:root_span, span_data.span_id})
54+
:ets.insert(@table, {{:root_span, span_data.span_id}, span_data})
5555
end
5656
else
5757
existing_spans = :ets.lookup(@table, span_data.parent_span_id)

0 commit comments

Comments
 (0)