diff --git a/lib/appsignal_plug.ex b/lib/appsignal_plug.ex index 1693db2..007ed91 100644 --- a/lib/appsignal_plug.ex +++ b/lib/appsignal_plug.ex @@ -1,6 +1,5 @@ defmodule Appsignal.Plug do - require Appsignal.Utils - @span Appsignal.Utils.compile_env(:appsignal, :appsignal_span, Appsignal.Span) + @span Application.compile_env(:appsignal, :appsignal_span, Appsignal.Span) @moduledoc """ AppSignal's Plug instrumentation instruments calls to Plug applications to @@ -28,16 +27,15 @@ defmodule Appsignal.Plug do defmacro __using__(_) do quote do require Logger - require Appsignal.Utils Appsignal.IntegrationLogger.debug("AppSignal.Plug attached to #{__MODULE__}") - @tracer Appsignal.Utils.compile_env(:appsignal, :appsignal_tracer, Appsignal.Tracer) - @span Appsignal.Utils.compile_env(:appsignal, :appsignal_span, Appsignal.Span) + @tracer Application.compile_env(:appsignal, :appsignal_tracer, Appsignal.Tracer) + @span Application.compile_env(:appsignal, :appsignal_span, Appsignal.Span) use Plug.ErrorHandler def call(%Plug.Conn{private: %{appsignal_plug_instrumented: true}} = conn, opts) do - Appsignal.Utils.warning( + Logger.warning( "Appsignal.Plug was included twice, disabling Appsignal.Plug. Please only `use Appsignal.Plug` once." )