-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Replace raven by sentry-sdk, and adjust config (fixes #3054) * Add Sentry to kinto.tpl * Test that Sentry message is sent on startup * Fix docs format * Remove := operator since kinto supports 3.7 * Remove usage of :ref: in CHANGELOG (used in package description) * Skip Sentry tests when monitoring deps not installed * Add Pyramid integration * Add test to verify that exceptions are reported
- Loading branch information
Showing
11 changed files
with
148 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,40 @@ This document describes changes between each past release. | |
14.8.1 (unreleased) | ||
------------------- | ||
|
||
**Breaking Changes** | ||
|
||
- ``raven`` is not installed by default anymore (fixes #3054). Sentry reporting is now enabled via settings (or environment variables). | ||
|
||
In order to migrate from Kinto <14 to Kinto 15, remove the mention of ``sentry`` and ``raven`` from your logging configuration: | ||
|
||
.. code-block:: diff | ||
# kinto.ini | ||
[logger_root] | ||
level = INFO | ||
- handlers = console, sentry | ||
+ handlers = console | ||
[handlers] | ||
- keys = console, sentry | ||
+ keys = console | ||
- [handler_sentry] | ||
- class = raven.handlers.logging.SentryHandler | ||
- args = ('https://<key>:<secret>@app.getsentry.com/<project>',) | ||
- level = WARNING | ||
- formatter = generic | ||
And add the following settings: | ||
|
||
.. code-block:: ini | ||
kinto.sentry_dsn = https://[email protected]/1 | ||
kinto.sentry_env = prod | ||
For more information, see `Settings documentation <https://kinto.readthedocs.io/en/stable/configuration/settings.html#authentication>`_. | ||
|
||
**Documentation** | ||
|
||
- Fix ``/batch`` endpoint documentation about required authentication. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -396,17 +396,29 @@ Example output: | |
{"Pid": 19240, "Type": "root", "Timestamp": 1489067817834153984, "Severity": 4, "Hostname": "pluo", "Logger": "%", "EnvVersion": "2.0", "Fields": {"perm": "read", "userid": "ldap:[email protected]", "message": "Permission not granted.", "uri": "/buckets/123"}} | ||
|
||
|
||
.. _handling-exceptions-with-sentry: | ||
|
||
Handling exceptions with Sentry | ||
::::::::::::::::::::::::::::::: | ||
|
||
Requires the ``raven`` package. | ||
|
||
Sentry logging can be enabled `as explained in official documentation | ||
<https://raven.readthedocs.io/en/latest/integrations/pyramid.html#logger-setup>`_. | ||
Sentry reporting can be enabled via the following settings: | ||
|
||
.. code-block:: ini | ||
kinto.sentry_dsn = https://[email protected]/1 | ||
kinto.sentry_env = stage | ||
Or the equivalent environment variables: | ||
|
||
:: | ||
|
||
SENTRY_DSN=https://[email protected]/1 | ||
SENTRY_ENV=stage | ||
|
||
.. note:: | ||
|
||
The application sends an *INFO* message on startup (mainly for setup check). | ||
The application sends an event on startup (mainly for setup check). | ||
|
||
|
||
Monitoring with StatsD | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ postgresql = | |
zope.sqlalchemy | ||
monitoring = | ||
newrelic | ||
raven | ||
sentry-sdk | ||
statsd | ||
werkzeug | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Maybe it make sense also enable SqlalchemyIntegration