monitor gifts
parent
3ac7448211
commit
4762285f8a
|
@ -411,9 +411,14 @@ object mon {
|
|||
val percent = gauge("plan.percent").withoutTags()
|
||||
object charge {
|
||||
def first(service: String) = counter("plan.charge.first").withTag("service", service)
|
||||
def countryCents(country: String, currency: java.util.Currency, service: String) =
|
||||
def countryCents(country: String, currency: java.util.Currency, service: String, gift: Boolean) =
|
||||
histogram("plan.charge.country.cents").withTags(
|
||||
Map("country" -> country, "currency" -> currency.getCurrencyCode, "service" -> service)
|
||||
Map(
|
||||
"country" -> country,
|
||||
"currency" -> currency.getCurrencyCode,
|
||||
"service" -> service,
|
||||
"gift" -> gift
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -424,7 +424,8 @@ final class PlanApi(
|
|||
.countryCents(
|
||||
country = country.fold("unknown")(_.code),
|
||||
currency = charge.money.currency,
|
||||
service = charge.serviceName
|
||||
service = charge.serviceName,
|
||||
gift = charge.giftTo.isDefined
|
||||
)
|
||||
.record(charge.usd.cents)
|
||||
charge.userId ?? { userId =>
|
||||
|
|
Loading…
Reference in New Issue