From a276eccba4e45450e11591177a4d47effc77a36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tao=20Bojl=C3=A9n?= <2803708-tao_oat@users.noreply.gitlab.com> Date: Tue, 6 Oct 2020 17:46:41 +0100 Subject: [PATCH] update to appsignal 2.0 --- CHANGELOG.md | 1 + backend/Dockerfile | 2 +- backend/README.md | 2 +- backend/config/config.exs | 3 +-- backend/lib/backend/application.ex | 7 ------- backend/lib/backend_web.ex | 2 ++ backend/mix.exs | 2 +- 7 files changed, 7 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b55ef5d..2f8762c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Update dependencies +- Update to Elixir 1.10 ### Deprecated diff --git a/backend/Dockerfile b/backend/Dockerfile index 9d095e2..79c0638 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,4 +1,4 @@ -FROM elixir:1.9.0-alpine as build +FROM elixir:1.10-alpine as build # install build dependencies RUN apk add --update git build-base diff --git a/backend/README.md b/backend/README.md index aea4387..d780a0c 100644 --- a/backend/README.md +++ b/backend/README.md @@ -2,7 +2,7 @@ ## Notes -- This project requires Elixir >= 1.9. +- This project requires Elixir >= 1.10. - Run with `SKIP_CRAWL=true` to just run the server (useful for working on the API without also crawling) - This project is automatically scanned for potential vulnerabilities with [Sobelow](https://sobelow.io/). diff --git a/backend/config/config.exs b/backend/config/config.exs index 390a228..9002967 100644 --- a/backend/config/config.exs +++ b/backend/config/config.exs @@ -15,8 +15,7 @@ config :backend, BackendWeb.Endpoint, url: [host: "localhost"], secret_key_base: "XL4NKGBN9lZMrQbMEI1KJOlwAt8S7younVJl90TdAgzmwyapr3g7BRYSNYvX0sZ9", render_errors: [view: BackendWeb.ErrorView, accepts: ~w(json)], - pubsub: [name: Backend.PubSub, adapter: Phoenix.PubSub.PG2], - instrumenters: [Appsignal.Phoenix.Instrumenter] + pubsub: [name: Backend.PubSub, adapter: Phoenix.PubSub.PG2] config :backend, Backend.Repo, queue_target: 5000 diff --git a/backend/lib/backend/application.ex b/backend/lib/backend/application.ex index 214c7ca..2d8ec13 100644 --- a/backend/lib/backend/application.ex +++ b/backend/lib/backend/application.ex @@ -7,13 +7,6 @@ defmodule Backend.Application do import Backend.Util def start(_type, _args) do - :telemetry.attach( - "appsignal-ecto", - [:backend, :repo, :query], - &Appsignal.Ecto.handle_event/4, - nil - ) - crawl_worker_count = get_config(:crawl_workers) children = [ diff --git a/backend/lib/backend_web.ex b/backend/lib/backend_web.ex index f0dd1ac..0433393 100644 --- a/backend/lib/backend_web.ex +++ b/backend/lib/backend_web.ex @@ -33,6 +33,8 @@ defmodule BackendWeb do root: "lib/backend_web/templates", namespace: BackendWeb + use Appsignal.Phoenix.View + # Import convenience functions from controllers import Phoenix.Controller, only: [get_flash: 1, get_flash: 2, view_module: 1] diff --git a/backend/mix.exs b/backend/mix.exs index e3ca8af..bdd1168 100644 --- a/backend/mix.exs +++ b/backend/mix.exs @@ -61,7 +61,7 @@ defmodule Backend.MixProject do {:swoosh, "~> 0.23.3"}, {:ex_twilio, "~> 0.7.0"}, {:elasticsearch, "~> 1.0"}, - {:appsignal, "~> 1.10.1"}, + {:appsignal_phoenix, "~> 2.0.0-beta.1"}, {:credo, "~> 1.1", only: [:dev, :test], runtime: false}, {:nebulex, "~> 1.1"}, {:hunter, "~> 0.5.1"},