File tree Expand file tree Collapse file tree 1 file changed +15
-19
lines changed
Expand file tree Collapse file tree 1 file changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -45,29 +45,25 @@ if Code.ensure_loaded?(:otel_sampler) do
4545 end
4646
4747 defp get_parent_sampling_decision ( ctx , trace_id ) do
48- try do
49- case :otel_tracer . current_span_ctx ( ctx ) do
50- :undefined ->
51- :no_parent
48+ case :otel_tracer . current_span_ctx ( ctx ) do
49+ :undefined ->
50+ :no_parent
5251
53- span_ctx ->
54- parent_trace_id = :otel_span . trace_id ( span_ctx )
52+ span_ctx ->
53+ parent_trace_id = :otel_span . trace_id ( span_ctx )
5554
56- if parent_trace_id == trace_id do
57- tracestate = :otel_span . tracestate ( span_ctx )
58- parent_sampled = get_tracestate_value ( tracestate , @ sentry_sampled_key )
55+ if parent_trace_id == trace_id do
56+ tracestate = :otel_span . tracestate ( span_ctx )
57+ parent_sampled = get_tracestate_value ( tracestate , @ sentry_sampled_key )
5958
60- case parent_sampled do
61- "true" -> { :inherit , true , tracestate }
62- "false" -> { :inherit , false , tracestate }
63- _ -> :no_parent
64- end
65- else
66- :no_parent
59+ case parent_sampled do
60+ "true" -> { :inherit , true , tracestate }
61+ "false" -> { :inherit , false , tracestate }
62+ _ -> :no_parent
6763 end
68- end
69- rescue
70- _ -> :no_parent
64+ else
65+ :no_parent
66+ end
7167 end
7268 end
7369
You can’t perform that action at this time.
0 commit comments