decentralized-identity / sidetree-reference-impl

Sidetree Reference Implementation
Apache License 2.0
5 stars 7 forks source link

Add support for metrics and reporting #43

Open thehenrytsai opened 4 years ago

csuwildcat commented 4 years ago

Here's a stab at some of the things we may want to include (some now, some in future releases) for metrics and reporting:

Node-level Metrics

The following metrics are desired in relation to the node's view of the global state and the actions it has performed:

  1. Total number of locking transactions the node has successfully written.
  2. Total number of operation transactions the node has successfully written.
  3. Number of operation transactions pending confirmation.
  4. Number of operations the node has queued for writing.
  5. Number of operations the node has written in total.
  6. Total number of locking transactions in the ledger.
  7. Total number of lock-chains in the ledger.
  8. Total number of operation transactions in the ledger.
  9. Total number of declared operations in the ledger.
  10. Number of unique, anchored DIDs the node has recorded.
  11. Number of operations the node has recorded, split out by type.

Block-level Metrics

The following metrics are desired relative to each block in the underlying ledger system:

  1. Total number of locking transactions
  2. Total number of operation transactions
  3. Total number of operations declared in this block

Transaction-level Metrics

The following metrics are desired relative to each protocol-related transaction in the underlying ledger system:

Locking Transactions:

  1. Type of lock - is it an initial lock or a relock?
  2. How many transactions have been linked to this lock?
  3. How many operations have been declared by this lock/chain of relocks?

Operation Transactions:

  1. Was the transaction linked to a lock? If so, record a reference to the lock-chain.
  2. Number of operations declared
  3. Were the files anchored by this transaction able to be resolved?
    • Which files were resolvable? (Anchor, Map, Chunk)