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

Report sent and delivered message count separately in api #9002

Open
1yuv opened this issue Apr 10, 2024 · 1 comment
Open

Report sent and delivered message count separately in api #9002

1yuv opened this issue Apr 10, 2024 · 1 comment
Labels
Type: Improvement Make something better

Comments

@1yuv
Copy link
Member

1yuv commented Apr 10, 2024

What feature do you want to improve?
Reporting of the message status on api

Describe the improvement you'd like
The messaging/outgoing/total section in /api/v2/monitoring currently combines both sent and delivered messages as a delivered and is reported accordingly. For example:

  "messaging": {
    "outgoing": {
      "total": {
        "due": 275827,
        "scheduled": 13856,
        "muted": 172372,
        "failed": 9064,
        "delivered": 192303
      },

Instead of this, report sent and delivered separately since they mean different things.

Describe alternatives you've considered
Instead of combining, report sent and delivered separately. This is already available in medic-admin/message_queue view. Updating this view would allow us to report sent and delivered separately. The expected output can be something like this:

  "messaging": {
    "outgoing": {
      "total": {
        "due": 275827,
        "scheduled": 13856,
        "muted": 172372,
        "failed": 9064,
        "sent": 100000,
        "delivered": 92303
      },

Additional context
We saw many messages remained in Sent state forever and saw that FCHVs never got those messages and they kept on sending new message to the system, resulting in duplicate activities. (More on this medic/config-moh-nepal#1212). If we report sent and delivered separately, it'll be easy to see this in grafana and be more actionable.

@1yuv 1yuv added the Type: Improvement Make something better label Apr 10, 2024
@binokaryg
Copy link
Member

Relevant issue & conversation:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement Make something better
Projects
None yet
Development

No branches or pull requests

2 participants