# Sentry Tryton module

**URL:** <https://discuss.tryton.org/t/sentry-tryton-module/741>\
**Category:** Third Party Modules\
**Created:** [September 16, 2018, 1:11pm UTC](https://discuss.tryton.org/t/sentry-tryton-module/741 "2018-09-16T13:11:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [September 16, 2018, 1:11pm UTC](https://discuss.tryton.org/t/sentry-tryton-module/741/1 "2018-09-16T13:11:08Z")

</div>

# Sentry Tryton module

- ✍ [Sergi Almacellas Abellana](http://www.koolpi.com)
- 📦 [Client Challenge](https://pypi.org/project/sentry_tryton/)
- 🐛 [Issues · Sergi Almacellas Abellana / sentry-tryton · GitLab](https://gitlab.com/pokoli/sentry-tryton/issues)
- 🦎 4.2, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.0
- 🐍 3.5, 3.6, 3.7, 3.8, 3.9

This module creates a new LoggingHandler for registering tryton exceptions on sentry. This exception will get some information available on tryton:

- Info about the current user
- The list of modules activated and it’s verions.
- The database name
- The backend name
- The request context

It also allows to define a custom error message and description that will be sent to the user instead of showing the full traceback.

**Usage**

The package includes an [example config file for using the sentry handler](https://gitlab.com/pokoli/sentry-tryton/-/blob/master/trytond-logconf.cfg). You only have to specify your sentry dsn on the first arg of the sentry handler. Once you have modified this file just lunch your trytond with:

trytond --logconf trytond-logconf.cfg

All server exceptions will be stored to sentry now so you can easly fix them without asking your users for additional information

---

<div class="post-metadata">

**Author:** ![bala4901](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/fbc32d/32.png) [@bala4901](https://discuss.tryton.org/u/bala4901)\
**Post date:** [July 5, 2021, 4:44pm UTC](https://discuss.tryton.org/t/sentry-tryton-module/741/2 "2021-07-05T16:44:11Z")

</div>

Hi @pokoli ,  
May I know how to intergrate sentry without losing the tryton error box?  
I found with direct show normal tryton box will be much easier for user to report the error to us.

Best regrads

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [July 6, 2021, 6:02am UTC](https://discuss.tryton.org/t/sentry-tryton-module/741/3 "2021-07-06T06:02:05Z")

</div>

Hi Markus,

If you do not set any error message message (the second and third argument of the handler) the error will be raised to the end user, so the normal tryton box willl be shown.

---

<div class="post-metadata">

**Author:** ![jonl](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/jonl/32/1126_2.png) [@jonl](https://discuss.tryton.org/u/jonl)\
**Post date:** [September 15, 2021, 3:35pm UTC](https://discuss.tryton.org/t/sentry-tryton-module/741/4 "2021-09-15T15:35:22Z")

</div>

It looks like the way to retain the standard error alert, pass empty strings as the 2nd and 3rd places of `args`. If you omit those, it will error on startup.
