Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin integration: g3w-admin-sentry-monitor #539

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Conversation

Raruto
Copy link
Contributor

@Raruto Raruto commented Apr 28, 2023

Almost the same as: g3w-suite/g3w-client#313

List of changes

Edit the g3w-admin/templates/base.html template according to the configuration instructions:

<!--
  Include javascript tracking script within all html pages you want to monitor

  see: https://docs.djangoproject.com/en/2.2/topics/templates/#the-django-template-language
-->
<html>
<body>
   ...
  {% if SETTINGS.SENTRY_JS %}
    {{ SETTINGS.SENTRY_JS | safe }}
  {% endif %}
  ...
</html>

How to test

  1. follow the installation instructions from g3w-admin-sentry-monitor
  2. be sure to update your local django settings accordingly:
# Update your Sentry project DSN (Data Source Name)
#
# see: https://docs.sentry.io/product/sentry-basics/dsn-explainer/
# -------------------------------------------

SENTRY_JS_DSN = "https://[email protected]/1"
SENTRY_PY_DSN = "https://[email protected]/2"
  1. check your sentry integration by intentionally triggering a javascript error within the code, eg:
<script>
  myUndefinedFunction(); // Intentionally trigger a javascript error
</script>

Side notes

For the time being, the g3w-admin-sentry-monitor plugin is not included by default, which means that the end user will have to install it manually to use it.

In the future we should also think about how to integrate the python tracker (ref: #446)
Nope, the python tracker is already integrated within the plugin, but please see: g3w-admin-sentry-monitor#todo

@Raruto Raruto added the tests Edit or add tests label Apr 28, 2023
@Raruto Raruto added this to the v3.6 milestone Apr 28, 2023
@Raruto Raruto changed the title Add plugin integration: g3w-admin-sentry-monitor (JS error tracker) Add plugin integration: g3w-admin-sentry-monitor Apr 28, 2023
Copy link
Contributor Author

@Raruto Raruto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wlorenzetti for me it's okay

@wlorenzetti wlorenzetti modified the milestones: v3.6, v3.7 May 24, 2023
@wlorenzetti wlorenzetti removed this from the v3.7 milestone Nov 29, 2023
@Raruto
Copy link
Contributor Author

Raruto commented Sep 26, 2024

@wlorenzetti eventually, you can also take a look at GlitchTip as an lighweight alternative self-hosted solution (it should be compatible with sentry-sdk).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Edit or add tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants