From 74fc30e8a5963f89849933edd1c509c4d5cc4c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tao=20Bror=20Bojl=C3=A9n?= Date: Sat, 27 Jul 2019 13:57:07 +0300 Subject: [PATCH] don't log crawl times with appsignal --- backend/lib/backend/crawler/crawler.ex | 6 ------ 1 file changed, 6 deletions(-) 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