Skip to content

Commit

Permalink
Update changelog and error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide committed Sep 14, 2023
1 parent d95a77c commit f6f577f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,25 @@
- Removed `Sentry.Event.culprit_from_stacktrace/1`
- Removed `Sentry.Event.do_put_source_context/3`
- Removed the `:async` value for the `:result` option in `Sentry.send_event/2` (and friends)
- Removed the `Sentry.Event.sentry_exception/0` type
- Accept all environments by default by changing the default for the `:included_environments` configuration option from `[:prod]` to `:all`
- Removed `Sentry.CrashError` — now, crash reports (detected through `Sentry.LoggerBackend`) that do not contain exceptions are reported as *messages* in Sentry
- Started accepting all environments by default by changing the default for the `:included_environments` configuration option from `[:prod]` to `:all`
- Changed the shape of the `Sentry.Event` struct - check out the new fields (and typespec for `Sentry.Event.t/0`)

### Improvements

- Add `Sentry.LoggerHandler`, which is a `:logger` handler rather than a `Logger` backend
- Make the `Sentry.HTTPClient.child_spec/0` callback optional
- Add `:all` as a possible value of the `:metadata` configuration option for `Sentry.LoggerBackend`
- Add `Sentry.Interfaces` with all the child modules, which are useful if you're working directly with the Sentry API

### Deprecations

- Soft-deprecate `Sentry.EventFilter` in favour of `:before_send_event` callbacks.

### Bug fixes

- Fix an issue with JSON-encoding non-encodable terms (such as PIDs, which are pretty common)

## 8.1.0

### Various fixes & improvements
Expand Down
23 changes: 19 additions & 4 deletions lib/sentry/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,26 @@ defmodule Sentry.Config do
@spec assert_dsn_has_no_query_params!() :: :ok
def assert_dsn_has_no_query_params! do
if sentry_dsn = dsn() do
if URI.parse(sentry_dsn).query do
uri_dsn = URI.parse(sentry_dsn)

if uri_dsn.query do
raise ArgumentError, """
using a Sentry DSN with query parameters is not supported since v9.0.0 of this library. \
Please remove the query parameters from your DSN and pass them in as regular \
configuration. See the documentation for the Sentry module for more information.\
using a Sentry DSN with query parameters is not supported since v9.0.0 of this library.
The configured DSN was:
#{inspect(sentry_dsn)}
The query string in that DSN is:
#{inspect(uri_dsn.query)}
Please remove the query parameters from your DSN and pass them in as regular
configuration. Check out the guide to upgrade to 9.0.0 at:
https://hexdocs.pm/sentry/upgrade-9.x.html
See the documentation for the Sentry module for more information on configuration
in general.
"""
end
end
Expand Down

0 comments on commit f6f577f

Please sign in to comment.