cloudstateio / cloudstate

Distributed State Management for Serverless

Home Page:https://cloudstate.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add instrumentation for value-based entities (Entity)

ralphlaude opened this issue · comments

Add some metrics for value-based entities using the already available prometheus client.
Metrics should be tagged by the user function entity name (such as "shopping-cart") so they're aggregated metrics for an entity type on a node.

Count metrics include:

  • gauge: entity instances currently active
  • count: entity instances that have activated
  • count: entity instances that have passivated
  • count: commands received for an entity
  • count: commands stashed for an entity
  • count: commands processed for an entity
  • count: load operations for an entity
  • count: state sizes (bytes) loaded for an entity
  • count: persist operations for an entity
  • count: state sizes (bytes) persisted for an entity
  • count: delete operations for an entity

Timing metrics include:

  • histogram: load operations duration for an entity
  • histogram: persist operations duration for an entity
  • histogram: delete operations duration for an entity

Please see #220