diff --git a/.gitignore b/.gitignore index e51ec0c82..63d156cfd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /db /deps /*.ez +/tmp/new_relic.log # Generated on crash by the VM erl_crash.dump diff --git a/lib/code_fund_web/router.ex b/lib/code_fund_web/router.ex index db67d6153..75531c034 100644 --- a/lib/code_fund_web/router.ex +++ b/lib/code_fund_web/router.ex @@ -6,6 +6,7 @@ defmodule CodeFundWeb.Router do end pipeline :browser do + use NewRelic.Transaction plug(:accepts, ["html"]) plug(:fetch_session) plug(:fetch_flash) @@ -15,6 +16,7 @@ defmodule CodeFundWeb.Router do end pipeline :protected do + use NewRelic.Transaction plug(:accepts, ["html"]) plug(:fetch_session) plug(:fetch_flash) @@ -25,6 +27,7 @@ defmodule CodeFundWeb.Router do end pipeline :protected_partials do + use NewRelic.Transaction plug(:accepts, ["html"]) plug(:fetch_session) plug(:put_secure_browser_headers) @@ -33,6 +36,8 @@ defmodule CodeFundWeb.Router do end pipeline :api do + use NewRelic.Transaction + plug( Corsica, max_age: 600, @@ -46,6 +51,7 @@ defmodule CodeFundWeb.Router do end pipeline :api_protected do + use NewRelic.Transaction plug(CodeFundWeb.Plugs.RequireAPIAccess) end diff --git a/mix.exs b/mix.exs index db02ce82c..8bc599b6d 100644 --- a/mix.exs +++ b/mix.exs @@ -66,7 +66,7 @@ defmodule CodeFund.Mixfile do {:phoenix_html, "~> 2.10"}, {:phoenix_live_reload, "~> 1.0", only: :dev}, {:gettext, "~> 0.11"}, - {:cowboy, "~> 1.0"}, + {:cowboy, "~> 1.0", override: true}, {:ex_money, "~> 1.0"}, {:number, "~> 0.5.4"}, {:coherence, github: "StareIntoTheBeard/coherence", branch: "update_uuid"}, @@ -95,6 +95,7 @@ defmodule CodeFund.Mixfile do {:sentry, "~> 7.0"}, {:jason, "~> 1.1"}, {:corsica, "~> 1.0"}, + {:new_relic_agent, "~> 1.0"}, {:joken, "~> 1.5.0"}, {:bamboo, "~> 0.8"}, {:ex_image_info, "~> 0.2.3"}, diff --git a/mix.lock b/mix.lock index eda33dd34..fe7b1441b 100644 --- a/mix.lock +++ b/mix.lock @@ -55,6 +55,7 @@ "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm"}, "mmdb2_decoder": {:hex, :mmdb2_decoder, "0.2.0", "34346c43bb1860d38d5505e5edf3d5e31a0d9fce4ee48f0c8c762875bcd05bb2", [:mix], [], "hexpm"}, "mock": {:hex, :mock, "0.3.1", "994f00150f79a0ea50dc9d86134cd9ebd0d177ad60bd04d1e46336cdfdb98ff9", [:mix], [{:meck, "~> 0.8.8", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm"}, + "new_relic_agent": {:hex, :new_relic_agent, "1.0.5", "5783ce8b17238a998d99cc278bbf34cc28b0d490c3bec036fdc77d81d62e2c59", [:mix], [{:cowboy, "~> 2.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, "number": {:hex, :number, "0.5.7", "da1ee0434f3c7b84360d33b335d0ee2f86f247f45fbe2e7636e6f55680b464dd", [:mix], [{:decimal, "~> 1.2", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm"}, "parallel_stream": {:hex, :parallel_stream, "1.0.6", "b967be2b23f0f6787fab7ed681b4c45a215a81481fb62b01a5b750fa8f30f76c", [:mix], [], "hexpm"}, "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm"},