       Tracer.set_attributes([{"attr-2", "value-2"}])
     end
 
+    attributes =
+      :otel_attributes.new([{"attr-1", "value-1"}, {"attr-2", "value-2"}], 128, :infinity)
+
     assert_receive {:span,
                     span(
                       name: "span-1",
-                      attributes: [{"attr-1", "value-1"}, {"attr-2", "value-2"}]
+                      attributes: ^attributes
                     )}
   end
 


    span_ctx(span_id: parent_span_id) = Span.end_span(s1)

    assert_receive {:span,
                    span(
                      name: "span-1",
                      attributes: []
                    )}

    assert_receive {:span,
                    span(
                      name: "span-2",
                      parent_span_id: ^parent_span_id,
                      attributes: [{"attr-1", "value-1"}, {"attr-2", "value-2"}]
                    )}
  end


    ret = Task.await(task)
    assert :hello = ret

    links = :otel_links.new([OpenTelemetry.link(parent)], 128, 128, :infinity)

    assert_receive {:span,
                    span(
                      name: "child",
                      parent_span_id: :undefined,
                      links: ^links
                    )}

    assert span_ctx() = Span.end_span(parent)
