diff --git a/.changesets/fix-telemetry-local-function-warning.md b/.changesets/fix-telemetry-local-function-warning.md new file mode 100644 index 000000000..9127430d8 --- /dev/null +++ b/.changesets/fix-telemetry-local-function-warning.md @@ -0,0 +1,6 @@ +--- +bump: "patch" +type: "fix" +--- + +Suppress a warning emitted by Telemetry 1.0.0, regarding the performance penalty of using local functions as event handlers, by specifying the module of the captured function. diff --git a/lib/appsignal/ecto.ex b/lib/appsignal/ecto.ex index 216e64382..b254e745f 100644 --- a/lib/appsignal/ecto.ex +++ b/lib/appsignal/ecto.ex @@ -29,7 +29,7 @@ defmodule Appsignal.Ecto do def attach(otp_app, repo) do event = telemetry_prefix(otp_app, repo) ++ [:query] - case :telemetry.attach({__MODULE__, event}, event, &handle_event/4, :ok) do + case :telemetry.attach({__MODULE__, event}, event, &__MODULE__.handle_event/4, :ok) do :ok -> Appsignal.Logger.debug("Appsignal.Ecto attached to #{inspect(event)}")