mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
merge from main
This commit is contained in:
@@ -107,6 +107,12 @@ class AwsCloudwatchClient(Client):
|
||||
provider_response = self._aws_value_or_default(
|
||||
event, "delivery", "providerResponse"
|
||||
)
|
||||
message_cost = self._aws_value_or_default(event, "delivery", "priceInUSD")
|
||||
if message_cost is None or message_cost == "":
|
||||
message_cost = 0.0
|
||||
else:
|
||||
message_cost = float(message_cost)
|
||||
|
||||
my_timestamp = self._aws_value_or_default(event, "notification", "timestamp")
|
||||
return {
|
||||
"notification.messageId": event["notification"]["messageId"],
|
||||
@@ -114,6 +120,7 @@ class AwsCloudwatchClient(Client):
|
||||
"delivery.phoneCarrier": phone_carrier,
|
||||
"delivery.providerResponse": provider_response,
|
||||
"@timestamp": my_timestamp,
|
||||
"delivery.priceInUSD": message_cost,
|
||||
}
|
||||
|
||||
# Here is an example of how to get the events with log insights
|
||||
|
||||
Reference in New Issue
Block a user