   def register(name, probe) do
     if genserver_running?() do
       if is_function(probe) do
-        GenServer.cast(__MODULE__, {:register, {name, probe}})
+        GenServer.cast(__MODULE__, {:register, {name, {Appsignal.Probes.FunctionProbeWrapper, [probe]}}})
         :ok
       else
         Logger.debug(fn ->

  end

  def init([]) do
    schedule_probes()
    {:ok, %{}}
  end


    pid = Process.whereis(__MODULE__)
    !is_nil(pid) && Process.alive?(pid)
  end
end
