Fix sentry setup

This commit is contained in:
Simon Prévost 2021-04-11 20:38:15 -04:00
parent 7ea785895c
commit 81f11118b3
2 changed files with 9 additions and 9 deletions

View File

@ -25,11 +25,6 @@ config :canary,
config :phoenix, :json_library, Jason
config :sentry,
included_environments: [:prod],
root_source_code_path: File.cwd!(),
release: version
config :tesla,
auth_enabled: true,
adapter: Tesla.Adapter.Hackney

View File

@ -1,5 +1,7 @@
import Config
version = Mix.Project.config()[:version]
defmodule Utilities do
def string_to_boolean("true"), do: true
def string_to_boolean("1"), do: true
@ -99,10 +101,6 @@ config :accent, Accent.WebappView,
sentry_dsn: System.get_env("WEBAPP_SENTRY_DSN") || "",
skip_subresource_integrity: System.get_env("WEBAPP_SKIP_SUBRESOURCE_INTEGRITY") || false
config :sentry,
dsn: System.get_env("SENTRY_DSN"),
environment_name: System.get_env("SENTRY_ENVIRONMENT_NAME")
if System.get_env("GOOGLE_TRANSLATIONS_SERVICE_ACCOUNT_KEY") do
config :goth, json: System.get_env("GOOGLE_TRANSLATIONS_SERVICE_ACCOUNT_KEY")
else
@ -113,6 +111,13 @@ config :tesla, logger_enabled: true
if !System.get_env("SENTRY_DSN") do
config :sentry, included_environments: []
else
config :sentry,
dsn: System.get_env("SENTRY_DSN"),
environment_name: System.get_env("SENTRY_ENVIRONMENT_NAME"),
included_environments: ~w(production),
root_source_code_path: File.cwd!(),
release: version
end
config :accent, Accent.Mailer,