This release contains a significant number of changes, including some backwards incompatible ones.
def deps do
[{:sentry, "~> 4.0"},
...]
end
Then run mix deps.update sentry
Sentry supports displaying the source code that caused an error, and now the library now supports it.
Example:
Some extra configuration is now required because of this.
If you'd like to enable the feature, add the following to your config:
config :sentry,
enable_source_code_context: true,
root_source_code_path: File.cwd!
If you'd like to disable it, add the following:
config :sentry,
enable_source_code_context: false
Due to the way the source code is handled for reporting, you have to force recompiling Sentry with mix deps.compile sentry --force
before deploying to production
to ensure the most recent source code is reported. For more information, please see the docs.
Starting in 4.0.0, Sentry.Plug
will not report Phoenix.Router.NoRouteError
as well as unmatched route errors in Plug.
Sentry.send_event
, Sentry.capture_exception
, and Sentry.capture_message
Return Success/Error more accurately
Previously, the above methods would return Task
on success, and potentially {:ok, String.t}
on an error. They will now return
{:ok, Task}
if successful, :ignored
if the Event is invalid or not in an active environment. If Sentry.capture_exception
is configured to exclude a particular exception, it will continue to return :excluded
.
There were also a bunch of smaller improvements, which you can see in the changelog.
Special thank yous to @jeregrine, @hauleth, @colinrymer, @waj, @myronmarston, and @DavidAntaramian for contributing to this release.
If you run into any problems, please don't hesitate to open an issue.