   agent gets set again.
   """
   def reset_environment_config! do
-    System.get_env
-    |> Enum.filter(
-      fn({"_APPSIGNAL_" <> _, _}) -> true;
-      (_) -> false end
-    ) |> Enum.each(fn({key, _}) ->
+    System.get_env()
+    |> Enum.filter(fn
+      {"_APPSIGNAL_" <> _, _} -> true
+      _ -> false
+    end)
+    |> Enum.each(fn {key, _} ->
       System.delete_env(key)
     end)
   end

    # Make AppSignal active by default if the APPSIGNAL_PUSH_API_KEY
    # environment variable is present.
    # Is overwritten by application config and env config.
    config = case System.get_env("APPSIGNAL_PUSH_API_KEY") do
      nil -> config
      _ -> Map.merge(config, %{active: true})
    end
    # Detect Heroku
    case Appsignal.System.heroku? do
      false -> config
      true -> Map.merge(config, %{running_in_container: true, log: "stdout"})
    end

  @string_list_keys ~w(APPSIGNAL_FILTER_PARAMETERS APPSIGNAL_IGNORE_ACTIONS APPSIGNAL_IGNORE_ERRORS APPSIGNAL_IGNORE_NAMESPACES APPSIGNAL_DNS_SERVERS)

  defp load_environment(config, list, converter) do
    list
    |> Enum.reduce(config, fn key, cfg ->
      value = System.get_env(key)

      if !empty?(value) do
        Map.put(cfg, @env_to_key_mapping[key], converter.(value))
      else
        cfg
      end
    end)
  end

  defp load_from_system() do
