Skip to content

[C4GT] Create Telemetry dashboard for notifications sent out #42

@karntrehan

Description

@karntrehan

Project Details

UCI is created with a vision to make the conversation flow creation configurable to a level, that it can be done by program owners, without the intervention of any engineers at all. At the same time, it also envisions reducing the redundant coding required for enabling the same business logic for different channels.

UCI aims to democratize the use of different communication channels such as WhatsApp, Telegram, SMS, email and more across all governance use cases.

UCI is being used to create 2 ways communication channels via chatbots between lakhs of teachers in Uttar Pradesh & the state. These chatbots are configured from an admin panel and trigger notifications to the teachers. Teachers then click on the notifications on their Android phones and talk to the chatbot. This is making day to day communication realtime & very effective between teachers and the state.

Features to be implemented

Once a notification is received, frontend clients can send back telemetry / analytics to the UCI acknowledging delivery and read receipts of the notifications. Currently this telemetry is not visualised.

We need to plan and implement a dashboard which will visualise the data to the users.

This could be integrated in the UCI - Admin repo itself.

What exists

  • firebase/web API already exists in inbound. Declared here. The data is being inserted into a database as well.

    Payload for API:

    {
      "text": "",
      "from": "",
      "messageId": "",
      "eventType": "DELIVERED/READ",
      "report": {
        "externalId": "",
        "destAdd": "",
        "fcmDestAdd": ""
      }
    }
  • Apart from this, the notification monitoring script outputs log data and Kafka data in a JSON format given below:

    {
      "Kafka Topics": {
        "broadcast-transformer": "7",
        "com.odk.transformer": "17",
        "generic-transformer": "0",
        "notification-outbound": "35",
        "outbound": "17",
        "inbound-processed": "24",
        "process-outbound": "52",
        "telemetry": "14",
        "outbound-processed": "0"
      },
      "UCI API": {
        "ResolveUser": 1
      },
      "Inbound": {
        "Data inserted in Cassandra": 1,
        "Kafka topic push": 1
      },
      "Orchestrator": {
        "Topic consumed from Kafka": 5,
        "Notification pushed to Kafka": 5
      },
      "Broadcast Transformer": {
        "Broadcast Processed": 5,
        "Kafka Push to outbound": 5
      },
      "Outbound": {
        "Saved data in cache": 5,
        "Notification inserted in Cassandra": 5
      }
    }
    

    The number of sections and items within each section can change. This needs to be visualized on the dashboard where each section should have its own graph illustrating its own items data.

  • All the services also generate log files which should be viewable from the dashboard itself. The log files may contains several GBs of data hence it is crucial to handle the pooling of data from the frontend and limit the amount of data being downloaded or else, it may be detrimental to the system. The functionality should consist of the following:

    • Pooling log data from the server.
    • Filtering logs based on a search string.

What needs to be built

  1. Reading data from the database
  2. Adding visualization to uci - admin
  3. Reading data from 1 and showing in 2

Learning Path

Complexity

Medium

Skills Required

Java to understand BE systems, React to design and develop the dashboard.

Name of Mentors:

@chinmoy12c

Project size

8 Weeks

Product Set Up

https://github.com/samagra-comms/docker-deploy#manual-setup---one-click-deployment-is-wip

Acceptance Criteria

  • Data sent from frontend clients is shown in the dashboard
  • Dashboard is filterable by:
    • Bot Id / Bot name
    • Event type - Delivered / Read
    • Date
    • External Id

Out of Scope

  1. Implementation of events in frontend

Milestones

  • Understanding the requirements
  • Understanding UCI Inbound
  • Understanding UCI Admin
  • Setting up UCI locally
  • Reading data from inbound database
  • Planning visualization
  • Adding visualization to uci - admin
  • Reading data from database and showing in dashboard
  • Adding filtering to dashboard
  • Adding test cases to dashboard and consumer

Designs

We shall refer to open source posthog visualizations.

C4GT

This issue is nominated for Code for GovTech (C4GT) 2023 edition.
C4GT is India's first annual coding program to create a community that can build and contribute to global Digital Public Goods. If you want to use Open Source GovTech to create impact, then this is the opportunity for you! More about C4GT here: https://codeforgovtech.in/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions