commit 66f8b9585e1743d8f764dccd1b77c4f095c5d354
parent 4eb43460a2a98d524a1270ac5768902559544fac
Author: Iván Ávalos <avalos@disroot.org>
Date: Fri, 12 Apr 2024 14:22:18 -0600
Log observability events
Diffstat:
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Backend/WalletCore.swift b/TalerWallet1/Backend/WalletCore.swift
@@ -301,6 +301,16 @@ extension WalletCore {
case Notification.Name.ProposalDownloaded.rawValue: // "proposal-downloaded":
symLog.log(anyPayload)
postNotification(.ProposalDownloaded, userInfo: nil)
+ case Notification.Name.TaskObservabilityEvent.rawValue:
+ symLog.log(anyPayload)
+ if let json = anyPayload.toJSON() {
+ observe(message: json)
+ }
+ case Notification.Name.RequestObservabilityEvent.rawValue:
+ symLog.log(anyPayload)
+ if let json = anyPayload.toJSON() {
+ observe(message: json)
+ }
// TODO: remove these once wallet-core doesn't send them anymore
// case "refresh-started", "refresh-melted",
diff --git a/TalerWallet1/Controllers/PublicConstants.swift b/TalerWallet1/Controllers/PublicConstants.swift
@@ -81,6 +81,8 @@ extension Notification.Name {
// static let PayOperationSuccess = Notification.Name("pay-operation-success")
static let ProposalAccepted = Notification.Name("proposal-accepted")
static let ProposalDownloaded = Notification.Name("proposal-downloaded")
+ static let TaskObservabilityEvent = Notification.Name("task-observability-event")
+ static let RequestObservabilityEvent = Notification.Name("request-observability-event")
static let Error = Notification.Name("error")
}