Include Sentry for Error Reporting #91

Closed
opened 2025-06-04 06:34:25 +00:00 by tobru · 0 comments
Owner

Stories

As a portal developer, I want to be informed about bugs and issues with the portal

Implementation Notes

Integrate Sentry as described in https://docs.sentry.io/platforms/python/guides/django/.
Only do it in Django code, no need to integrate the Sentry JavaScript in the frontend.

uv add "sentry-sdk[django]"

Implementation idea in settings.py:

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from servala.__about__ import __version__ as version

SERVALA_SENTRY_DSN = os.environ.get("SERVALA_SENTRY_DSN")
sentry_sdk.init(
    dsn=SERVALA_SENTRY_DSN,
    integrations=[DjangoIntegration()],
    auto_session_tracking=False,
    traces_sample_rate=0.01,
    release=version,
    environment=SERVALA_ENVIRONMENT,
)

Note that we're currently using https://glitchtip.com/ instead of "real" Sentry.

## Stories _As a portal developer, I want to be informed about bugs and issues with the portal_ ## Implementation Notes Integrate Sentry as described in https://docs.sentry.io/platforms/python/guides/django/. Only do it in Django code, no need to integrate the Sentry JavaScript in the frontend. ``` uv add "sentry-sdk[django]" ``` Implementation idea in settings.py: ``` import sentry_sdk from sentry_sdk.integrations.django import DjangoIntegration from servala.__about__ import __version__ as version SERVALA_SENTRY_DSN = os.environ.get("SERVALA_SENTRY_DSN") sentry_sdk.init( dsn=SERVALA_SENTRY_DSN, integrations=[DjangoIntegration()], auto_session_tracking=False, traces_sample_rate=0.01, release=version, environment=SERVALA_ENVIRONMENT, ) ``` Note that we're currently using https://glitchtip.com/ instead of "real" Sentry.
tobru added the
enhancement
label 2025-06-04 06:34:25 +00:00
tobru added this to the Development Planning project 2025-06-04 06:34:25 +00:00
tobru self-assigned this 2025-06-04 06:40:59 +00:00
rixx closed this issue 2025-06-04 08:35:40 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: servala/servala-portal#91
No description provided.