   Configures the observer with a tuple of plugin `mod` and
   configuration `config`.
   """
+  @spec configure(pid, plugin_config_t) :: :ok
   def configure(observer, {mod, config}) do
     configure(observer, [{mod, config}])
   end

  Configures the Observer with a list of plugin names and their
  initializations. This list is executed in reverse order.
  """
def configure(observer, plug_list) when is_list(plug_list) do
    GenServer.call(observer, {:configure, plug_list})
  end


  def do_observe(plug, state) do
    # Logger.debug("do_observe: plug = #{inspect plug}, state = #{inspect state}")
    case state |> Map.fetch!(plug) |> plug.observe() do
      {:ok, result, s} when is_list(result) ->
        # Logger.debug("got url and bmf from plug #{inspect plug}")
        {:ok, state
          |> Map.put(:"$result", result)
