Skip to content

Commit

Permalink
Added Sentry for error reporting (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
vloothuis authored Aug 16, 2023
1 parent 2eecc27 commit a7c8e06
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ config :core, BankingClient,
certfile: "../banking_proxy/certs/client_certificate.pem",
keyfile: "../banking_proxy/certs/client_key.pem"

config :sentry,
included_environments: ~w(prod test),
environment_name: Mix.env(),
tags: %{app_version: System.get_env("VERSION", "dev")}

module =
case Code.ensure_compiled(Bundle) do
{:module, module} ->
Expand Down
4 changes: 4 additions & 0 deletions core/config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,8 @@ if config_env() == :prod do
private_key: System.get_env("WEB_PUSH_PRIVATE_KEY")

config :logger, level: System.get_env("LOG_LEVEL", "info") |> String.to_existing_atom()

config :sentry,
dsn: System.get_env("SENTRY_DSN"),
environment_name: System.get_env("RELEASE_ENV") || "prod"
end
1 change: 1 addition & 0 deletions core/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ defmodule Core.MixProject do
{:logger_json, "~> 4.3"},
{:statistics, "~> 0.6.2"},
{:csv, "~> 2.4"},
{:sentry, "~> 8.0"},
# i18n
{:ex_cldr, "~> 2.25"},
{:ex_cldr_numbers, "~> 2.23"},
Expand Down
1 change: 1 addition & 0 deletions core/mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"progress_bar": {:hex, :progress_bar, "2.0.1", "7b40200112ae533d5adceb80ff75fbe66dc753bca5f6c55c073bfc122d71896d", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "2519eb58a2f149a3a094e729378256d8cb6d96a259ec94841bd69fdc71f18f87"},
"ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
"remote_ip": {:hex, :remote_ip, "1.1.0", "cb308841595d15df3f9073b7c39243a1dd6ca56e5020295cb012c76fbec50f2d", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "616ffdf66aaad6a72fc546dabf42eed87e2a99e97b09cbd92b10cc180d02ed74"},
"sentry": {:hex, :sentry, "8.1.0", "8d235b62fce5f8e067ea1644e30939405b71a5e1599d9529ff82899d11d03f2b", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "f9fc7641ef61e885510f5e5963c2948b9de1de597c63f781e9d3d6c9c8681ab4"},
"socket": {:hex, :socket, "0.3.13", "98a2ab20ce17f95fb512c5cadddba32b57273e0d2dba2d2e5f976c5969d0c632", [:mix], [], "hexpm", "f82ea9833ef49dde272e6568ab8aac657a636acb4cf44a7de8a935acb8957c2e"},
"sourceror": {:hex, :sourceror, "0.12.2", "2ae55efd149193572e0eb723df7c7a1bda9ab33c43373c82642931dbb2f4e428", [:mix], [], "hexpm", "7ad74ade6fb079c71f29fae10c34bcf2323542d8c51ee1bcd77a546cfa89d59c"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
Expand Down

0 comments on commit a7c8e06

Please sign in to comment.