Skip to content

Commit b3bc0e1

Browse files
committed
Fix dialyzer warnings
1 parent 88cc5b2 commit b3bc0e1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/sentry/opentelemetry/sampler.ex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ if Code.ensure_loaded?(:otel_sampler) do
5959
case parent_sampled do
6060
"true" -> {:inherit, true, tracestate}
6161
"false" -> {:inherit, false, tracestate}
62-
_ -> :no_parent
62+
nil -> :no_parent
6363
end
6464
else
6565
:no_parent
@@ -95,13 +95,15 @@ if Code.ensure_loaded?(:otel_sampler) do
9595
]
9696
end
9797

98+
defp get_tracestate_value({:tracestate, tracestate}, key) do
99+
get_tracestate_value(tracestate, key)
100+
end
101+
98102
defp get_tracestate_value(tracestate, key) when is_list(tracestate) do
99103
case List.keyfind(tracestate, key, 0) do
100104
{^key, value} -> value
101105
nil -> nil
102106
end
103107
end
104-
105-
defp get_tracestate_value(_tracestate, _key), do: nil
106108
end
107109
end

0 commit comments

Comments
 (0)