merge from main

This commit is contained in:
Kenneth Kehl
2025-03-11 13:21:31 -07:00
16 changed files with 673 additions and 275 deletions

View File

@@ -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