 
   describe "instrument/2, when passing a function that takes an argument" do
     setup do
-      Test.Nif.start_link()
-      Test.Tracer.start_link()
-      Test.Span.start_link()
+      start_supervised(Test.Nif)
+      start_supervised(Test.Tracer)
+      start_supervised(Test.Span)
 
       %{return: Appsignal.instrument("test", fn span -> span end)}
     end


  describe "instrument/1, when a root span exists" do
    setup do
      Test.Nif.start_link()
      Test.Tracer.start_link()
      Test.Span.start_link()

      %{
        parent: Tracer.create_span("http_request"),


  describe "instrument/2" do
    setup do
      start_supervised(Test.Nif)
      start_supervised(Test.Tracer)
      start_supervised(Test.Span)

      %{return: Appsignal.instrument("test", fn -> :ok end)}
    end
