~singpolyma/sgx-jmp

ref: 5bbec00c56602eefc83aad3a450bd67d06f671db sgx-jmp/lib/statsd.rb -rw-r--r-- 1.4 KiB
5bbec00cStephen Paul Weber typo 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

require "statsd-instrument"

# These are basically data, not code, I find them more readable on one line each
# rubocop:disable Metrics/LineLength

Registration::Registered.extend StatsD::Instrument
Registration::Registered.statsd_count :write, "registration.registered"

Registration::Activation.extend StatsD::Instrument
Registration::Activation.statsd_count :write, "registration.activation"

Registration::Payment::Bitcoin.extend StatsD::Instrument
Registration::Payment::Bitcoin.statsd_count :write, "registration.payment.bitcoin"

Registration::Payment::CreditCard.extend StatsD::Instrument
Registration::Payment::CreditCard.statsd_count :write, "registration.payment.credit_card"

Registration::Payment::CreditCard::Activate.extend StatsD::Instrument
Registration::Payment::CreditCard::Activate.statsd_count :write, "registration.payment.credit_card.activate"
Registration::Payment::CreditCard::Activate.statsd_count :declined, "registration.payment.credit_card.activate_declined"

Registration::Payment::InviteCode.extend StatsD::Instrument
Registration::Payment::InviteCode.statsd_count :write, "registration.payment.invite_code"

Registration::Payment::Mail.extend StatsD::Instrument
Registration::Payment::Mail.statsd_count :write, "registration.payment.mail"

Registration::Finish.extend StatsD::Instrument
Registration::Finish.statsd_count :write, "registration.finish"

# rubocop:enable Metrics/LineLength