Skip to content

Commit

Permalink
[tunnelbroker] add errorType patterns for alarming on tunnelbroker fo…
Browse files Browse the repository at this point in the history
…r notifs

Summary:
I'm not 100% if we should be alarming on these given that looking through prior logs, we're spammed with failed FCM notifications. Putting this diff up for feedback

Depends on D13454

Test Plan: Test that alarms are triggerable later in stack

Reviewers: kamil, bartek, varun

Reviewed By: varun

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D13455
  • Loading branch information
wyilio committed Sep 25, 2024
1 parent 76eb33b commit eeaa717
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/tunnelbroker/src/notifs/fcm/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::constants::error_types;
use crate::constants::PUSH_SERVICE_REQUEST_TIMEOUT;
use crate::notifs::fcm::config::FCMConfig;
use crate::notifs::fcm::error::Error::FCMError;
Expand Down Expand Up @@ -80,8 +81,11 @@ impl FCMClient {
.await
.unwrap_or_else(|error| format!("Error occurred: {}", error));
error!(
errorType = error_types::FCM_ERROR,
"Failed sending FCM notification to: {}. Status: {}. Body: {}",
token, error_status, body
token,
error_status,
body
);
let fcm_error = FCMErrorResponse::from_status(error_status, body);
Err(FCMError(fcm_error))
Expand Down
1 change: 1 addition & 0 deletions services/tunnelbroker/src/notifs/wns/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ impl WNSClient {
.await
.unwrap_or_else(|error| format!("Error occurred: {}", error));
tracing::error!(
errorType = error_types::WNS_ERROR,
"Failed sending WNS notification to: {}. Status: {}. Body: {}",
&url,
error_status,
Expand Down

0 comments on commit eeaa717

Please sign in to comment.