November 11, 2022

Integrate Open edX with Sentry

Activities, Android Developer, Ansible, Apache2, Atlassian, Ayo Belajar Linux, Bestpath Network, BLC Telkom Klaten, BSD, Caddy Server, Case Study, Cisco, Cisco Indonesia, Cloud Computing, Cockpit, Custom Weapons, Docker, E-Learning, Engenius, Error, FreeBSD, FreeBSD Indonesia, Komunitas Pengguna Linux Indonesia, KPLI Bulukumba, KPLI Klaten, Lets Encrypt, Linux, MacOS, Microsoft Azure, Microsoft SQL Server, MikroTik, MikroTik Indonesia, MySQL, Nginx, Open edX, OpenSID, Others, PHP, phpMyAdmin, PostgreSQL, Proxmox, Python, Redash, Sendy, SSH, Stories, Subnetting, TP-Link, Ubiquiti, Unix, Virtualization, Windows, X-Mosque, Faizar Septiawan, Icar, siBunglonGanteng, Orang Ganteng, siBunglonLabs, Programmer, SysAdmin, Site Reliability Engineer, Developer, Palugada, Makassar, Ganteng, Gila, Cyclist, Panglima, Setan, Panglima Setan, sibunglon, Ganteng

Setting up Sentry crash reporting if you want to provide a reliable service, it’s extremely important to be aware of when things are going wrong on the website.

Sentry is a wonderful free system to catch Python exceptions.

For Django on Open edX, we use sentry-sdk to catch and report the errors back to Sentry.

  1. Set up a Sentry server or use existing Sentry .

  2. Set up two new services (LMS and Studio) in Sentry and get their DSN strings.

  3. On Open edX instance, install sentry-sdk using pip.

    sudo /edx/bin/pip.edxapp install sentry-sdk==1.2.0
    
  4. Then configure the SDK, initialize it with the Django integration in your settings.py file as per sentry instructions after create new services in Sentry.

    • /edx/app/edxapp/edx-platform/lms/envs/production.py
    • /edx/app/edxapp/edx-platform/cms/envs/production.py
  5. Restart edxapp service and worker.

    /edx/bin/supervisorctl restart lms cms edxapp_worker: