def deps do
[
{:sentry, "~> 7.0"},
]
end
Sentry 7.x allows configuring which JSON library you use, and does not install a JSON library by default. Sentry will attempt to fall back to using Jason by default, but will error if it isn't available. If you already have Jason in your dependencies, you don't have to change anything. If you are using Poison or another JSON library and would like to continue using it, Sentry must be configured to use it:
config :sentry,
# ...
json_library: Poison
Then run mix deps.get
to get the new version of Sentry!
If you are using Sentry.Logger
, replace it with Sentry.LoggerBackend
:
# application.ex
opts = [strategy: :one_for_one, name: MyApp.Supervisor]
- :ok = :error_logger.add_report_handler(Sentry.Logger)
+ {:ok, _} = Logger.add_backend(Sentry.LoggerBackend)
Supervisor.start_link(children, opts)