Enable integration with Sentry for error reporting #6474

Closed
opened 2025-12-29 19:41:07 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (May 11, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.2.2

Feature type

New functionality

Proposed functionality

Enable error reporting via Sentry. This will entail installation of the Sentry SDK for Python as well as the introduction of several new configuration parameters:

  • SENTRY_ENABLED - Master toggle for error reporting (disabled by default)
  • SENTRY_DSN - This will default to the DSN designated for the NetBox project, but can be overridden by users who want to point NetBox to their own Sentry DSN
  • SENTRY_TAGS - An optional dictionary of tags to set on error reports

When configured and enabled, NetBox will begin sending exception reports to the configured Sentry DSN. Implementing this functionality requires only calling sentry_sdk.init() with the appropriate parameters in settings.py; the Django integration takes care of everything else.

Use case

There are two primary motivations for this integration:

  • Enable NetBox users to easily collect and analyze their own errors via Sentry
  • Enable the NetBox development team to collect and analyze errors from community members who have opted to enable error reporting

On the latter point, this will allow us to more proactively detect and resolve bugs and other issues. Even just enabling it for the public demo is sure to yield some interesting reports.

Database changes

None

External dependencies

This will introduce sentry-sdk as a new dependency. (The SDK as well as Sentry itself are available as open source software.)

Originally created by @jeremystretch on GitHub (May 11, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.2.2 ### Feature type New functionality ### Proposed functionality Enable error reporting via [Sentry](https://sentry.io/). This will entail installation of the [Sentry SDK for Python](https://pypi.org/project/sentry-sdk/) as well as the introduction of several new configuration parameters: * `SENTRY_ENABLED` - Master toggle for error reporting (disabled by default) * `SENTRY_DSN` - This will default to the DSN designated for the NetBox project, but can be overridden by users who want to point NetBox to their own Sentry DSN * `SENTRY_TAGS` - An optional dictionary of tags to set on error reports When configured and enabled, NetBox will begin sending exception reports to the configured Sentry DSN. Implementing this functionality requires only calling `sentry_sdk.init()` with the appropriate parameters in `settings.py`; the Django integration takes care of everything else. ### Use case There are two primary motivations for this integration: * Enable NetBox users to easily collect and analyze their own errors via Sentry * Enable the NetBox development team to collect and analyze errors from community members who have opted to enable error reporting On the latter point, this will allow us to more proactively detect and resolve bugs and other issues. Even just enabling it for the [public demo](https://demo.netbox.dev/) is sure to yield some interesting reports. ### Database changes None ### External dependencies This will introduce [`sentry-sdk`](https://pypi.org/project/sentry-sdk/) as a new dependency. (The SDK as well as Sentry itself are available as open source software.)
adam added the status: acceptedtype: feature labels 2025-12-29 19:41:07 +01:00
adam closed this issue 2025-12-29 19:41:07 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6474