Page MenuHomePhabricator

[Tunnelbroker] add missing error logs for notifs
ClosedPublic

Authored by kamil on Nov 19 2024, 5:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 5:13 PM
Unknown Object (File)
Mon, Dec 16, 12:31 PM
Unknown Object (File)
Mon, Dec 16, 2:34 AM
Unknown Object (File)
Mon, Dec 16, 2:34 AM
Unknown Object (File)
Tue, Dec 10, 6:57 AM
Unknown Object (File)
Mon, Dec 9, 11:43 PM
Unknown Object (File)
Sun, Dec 8, 3:59 AM
Unknown Object (File)
Sat, Dec 7, 3:17 AM
Subscribers

Details

Summary

While investigating ENG-9925 I discovered there are a couple more errors that worth logging

Depends on D13969

Test Plan

Not really sure what is the best way to test it - maybe @will have some ideas.


On APNs:

  1. Notif works
  2. Update the code to send notif with random priority -> fails with BadPriority

On web:

  1. Notif works
  2. Triggering error is complicated because we use lib, so just reading the code as we use the same approach as for others

Diff Detail

Repository
rCOMM Comm
Branch
secondary-auth
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil retitled this revision from [Tunnelbroker] add missing error logs for alarms to [Tunnelbroker] add missing error logs for notifs.Nov 19 2024, 5:20 AM
kamil added inline comments.
services/tunnelbroker/src/websockets/session.rs
667–673

there is no better place to do it, for Web Push we use lib instead of our custom implementation

kamil published this revision for review.Nov 19 2024, 6:46 AM

Testing that adding WEB_PUSH_ERROR and APNS_ERROR error types to an error log will trigger an alarm + email notif has already been tested. I don't think this needs further testing.

The best way of testing this would be to ensure that failing to sending APNs error or Web Push notif logs the error. Cloudwatch alarms will take care of the rest

Doing this locally and ensuring you can find the error logs should be sufficient imo

In D13970#389656, @will wrote:

Testing that adding WEB_PUSH_ERROR and APNS_ERROR error types to an error log will trigger an alarm + email notif has already been tested. I don't think this needs further testing.

The best way of testing this would be to ensure that failing to sending APNs error or Web Push notif logs the error. Cloudwatch alarms will take care of the rest

Doing this locally and ensuring you can find the error logs should be sufficient imo

Thanks - updated test plan

This revision is now accepted and ready to land.Nov 20 2024, 5:49 AM