Application Monitoring with Sentry

Application Monitoring with Sentry

 

Introduction

In the context of the openIMIS Sandbox setup project, managing application bugs and exceptions at scale is a critical challenge. With thousands of users interacting with the system across different environments, errors can emerge from a wide variety of user scenarios. Without a centralized monitoring solution, identifying, reproducing, and fixing these issues becomes slow and inefficient.

Sentry is an open-source application monitoring platform designed to provide real-time bug tracking and detailed error reporting. It enables developers to capture:

  • The full log trace of an error.

  • The execution context leading to the crash.

  • The user session and environment in which the error occurred.

  • Tools for assigning and tracking bugs across development teams.

By deploying Sentry in the Sandbox environment, we create a controlled setup for monitoring bugs and exceptions in backend, frontend, mobile and API interactions.

 

Current Status in openIMIS

  • A basic Sentry configuration already exists at the backend level of openIMIS.

  • The next step is to implement a complete deployment of the Sentry Community Edition within the openIMIS Sandbox Server.

  • This deployment ensures monitoring capabilities that are:

    • Close to the running server (low latency).

    • Data sovereign (logs remain within the implementation country infrastructure).

    • Independent from external SaaS providers (compliance with privacy/security requirements).

Deployment Objectives

  1. Full Sentry Community Edition Deployment

    • Set up Docker-based deployment of Sentry CE in the sandbox server.

    • Configure ingestion from openIMIS backend, frontend, and related services.

    • Secure the deployment (SSL, user roles, access control).

  2. Integration with openIMIS

    • Extend backend and frontend clients to send exception events.

    • Tag errors by environment (dev, demo, production-like).

    • Map errors to developer teams/modules for efficient bug attribution.

  3. Monitoring & Reporting

    • Provide real-time dashboards of exception rates.

    • Enable notification channels (email, discord).

    • Configure retention and anonymization policies to comply with data governance.

 

Considerations

  • Performance & Resource Use:
    Sentry CE is a heavy application (multiple services: Kafka, Redis, Postgres, Clickhouse). Running it in production requires dedicated resources.

  • Alternatives for Lightweight Monitoring:
    In environments where Sentry CE is too resource-intensive, lighter open-source options can be considered:

    • GlitchTip – a community-maintained lightweight alternative to Sentry, fully compatible with the Sentry SDKs.

    • Elastic APM (Application Performance Monitoring) – part of the Elastic stack, providing error and performance monitoring.

These alternatives may reduce operational complexity while still providing sufficient error tracking capabilities for medium-scale openIMIS deployments.

Did you encounter a problem or do you have a suggestion?

Please contact our Service Desk



This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/