SGX-JMP Metrics

Some metrics should be added to SGX-JMP for increased observability.

Some ideas:

  • Count on startup (so we can get a graph of starts over a period)
  • Count on phone call, split by inbound and outbound, and XMPP and SIP
    • This isn’t for customer insights, it’s for system insights. If the number of phone calls changes drastically, something might have happened
  • count on any kind of calling error we can categorize
    • this will let us tell the difference between “some calls error sometimes” and “calling is currently down and that’s weird”
    • we should maybe also count any things we retry so we can see if that number is going up or down or staying similar, etc
  • count on message from customers
  • count on messages from not-customers
  • count on messages to customers
  • count on messages to not-customers
  • count on errors from cheogram on forwarded messages
  • count on error from bwmsgx on forwarded messages
  • count on hit to our voicemail endpoint
  • count on transcription API use and errors
  • timer on transcription API latency
  • timer on OGM compute latency
  • count on bandwidth API use (and errors)
    • probably categorized by an endpoint identifier so we can tell the various call-sites apart
  • timer on bandwidth API latency
    • same tags as above
  • count on credit card API usages (and errors)
  • count on auto-top-ups (and errors)
  • count on vaults (and errors)
  • timer for latency on Braintree API usage by endpoint
  • timer for latency on command processing by command
  • count for command (and error) by node
  • gauge for number of concurrent commands
    • This would tell us the difference between a small number of commands running quickly, and a growing number of commands that are all inflight
  • count on db notification by notification
  • gauge on log-queue size
  • count on failure to send things to sentry
  • incoming message delay between components, from Redis message cache; compute/show deltas between these over time:
    • ts_010_unix-first_received
    • ts_020_unix-first_db_hit
    • ts_030_unix-translator_received
    • ts_040_unix-translator_pre_send
  • percentage of messages from Redis message cache with each type of errorCode (including none)
    • common errorCode values are 4410, 4770, and 9902
  • percentage of XMPP messages we receive (in any component) that are error stanzas
    • grouped by domainpart, and possibly error type
    • see (and possibly merge with) "count on error"s above
  • percentage of HTTP responses we get back from Bandwidth with each HTTP code (200, 429, etc.)
    • across all components, and grouped by component
    • ideally also grouped by Bandwidth endpoint URL