diff --git a/backend/lib/backend/crawler/crawler.ex b/backend/lib/backend/crawler/crawler.ex index 35c1d8d..392425c 100644 --- a/backend/lib/backend/crawler/crawler.ex +++ b/backend/lib/backend/crawler/crawler.ex @@ -10,7 +10,6 @@ defmodule Backend.Crawler do import Ecto.Query import Backend.Util require Logger - use Appsignal.Instrumentation.Decorators defstruct [ # the instance domain (a string) @@ -32,7 +31,6 @@ defmodule Backend.Crawler do error: String.t() | nil } - @decorate transaction() def run(domain) do Logger.debug("Starting crawl of #{domain}") @@ -60,13 +58,11 @@ defmodule Backend.Crawler do # Recursive function to check whether `domain` has an API that the head of the api_crawlers list can read. # If so, crawls it. If not, continues with the tail of the api_crawlers list. - @decorate transaction_event() defp crawl(%Crawler{api_crawlers: [], domain: domain} = state) do Logger.debug("Found no compatible API for #{domain}") Map.put(state, :found_api?, false) end - @decorate transaction_event() defp crawl(%Crawler{domain: domain, api_crawlers: [curr | remaining_crawlers]} = state) do if curr.is_instance_type?(domain) do Logger.debug("Found #{curr} instance") @@ -97,7 +93,6 @@ defmodule Backend.Crawler do end # Save the state (after crawling) to the database. - @decorate transaction_event() defp save(%Crawler{ domain: domain, result: result, @@ -214,7 +209,6 @@ defmodule Backend.Crawler do |> Repo.insert_all(interactions) end - @decorate transaction_event() defp save(%{domain: domain, error: error, allows_crawling?: allows_crawling}) do error = cond do