Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2017
What would you like to do?
Sentry 5.0.0 to 6.0.0 Upgrade Instructions

Sentry 6.0.0

This release contains a number of changes, including some backwards incompatible ones.

Bump your sentry dependency

def deps do
  [{:sentry, "~> 6.0"},

Then run mix deps.update sentry

Backwards Incompatible Changes

Remove use_error_logger configuration

There were issues with automatically configuring the error_logger to send events to Sentry, so it is now required to be set up manually, and the use_error_logger configuration is no longer used.

You will have to remove any usage of use_error_logger in your config, and add Sentry's report handler in the start function for your application.

# config/config.exs

config :sentry,
-  use_error_logger: true
   # more config...
# my_app.ex
def start(_type, _opts) do
  children = [
    supervisor(Task.Supervisor, [[name: MyApp.TaskSupervisor]]),
  opts = [strategy: :one_for_one, name: MyApp.Supervisor]
+ :ok = :error_logger.add_report_handler(Sentry.Logger)
  Supervisor.start_link(children, opts)

This was changed in #196.

Configuration of enable_source_code_context is no longer required

This shouldn't cause too many issues, but is a breaking change nonetheless. If you are expecting your application to crash on checking that enable_source_code_context configuration exists, it will no longer do so. :)

This was changed in #201.

Other Stuff

There were also some smaller improvements, which you can see in the changelog.

Special thank yous to @jeregrine, @kamilogorek, and @halostatue for contributing to this release.

If you run into any problems, please don't hesitate to open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment