Documentation ¶
Index ¶
- type Handler
- type Metrics
- func (m *Metrics) AddOperationTime(value time.Duration)
- func (m *Metrics) AddProofParseCredential(value time.Duration)
- func (m *Metrics) AddProofSign(value time.Duration)
- func (m *Metrics) BatchAckTime(value time.Duration)
- func (m *Metrics) BatchCutTime(value time.Duration)
- func (m *Metrics) BatchNackTime(value time.Duration)
- func (m *Metrics) BatchRollbackTime(value time.Duration)
- func (m *Metrics) BatchSize(value float64)
- func (m *Metrics) CASIncrementCacheHitCount()
- func (m *Metrics) CASReadTime(casType string, value time.Duration)
- func (m *Metrics) CASResolveTime(value time.Duration)
- func (m *Metrics) CASWriteTime(value time.Duration)
- func (m *Metrics) DBDeleteTime(dbType string, value time.Duration)
- func (m *Metrics) DBGetBulkTime(dbType string, value time.Duration)
- func (m *Metrics) DBGetTagsTime(dbType string, value time.Duration)
- func (m *Metrics) DBGetTime(dbType string, value time.Duration)
- func (m *Metrics) DBPutTime(dbType string, value time.Duration)
- func (m *Metrics) DBQueryTime(dbType string, value time.Duration)
- func (m *Metrics) DocumentCreateUpdateTime(value time.Duration)
- func (m *Metrics) DocumentResolveTime(value time.Duration)
- func (m *Metrics) InboxHandlerTime(activityType string, value time.Duration)
- func (m *Metrics) OutboxIncrementActivityCount(activityType string)
- func (m *Metrics) OutboxPostTime(value time.Duration)
- func (m *Metrics) OutboxResolveInboxesTime(value time.Duration)
- func (m *Metrics) ProcessAnchorTime(value time.Duration)
- func (m *Metrics) ProcessDIDTime(value time.Duration)
- func (m *Metrics) ProcessWitnessedAnchorCredentialTime(value time.Duration)
- func (m *Metrics) SignerAddLinkedDataProof(value time.Duration)
- func (m *Metrics) SignerGetKey(value time.Duration)
- func (m *Metrics) SignerSign(value time.Duration)
- func (m *Metrics) WitnessAddProof(value time.Duration)
- func (m *Metrics) WitnessAddProofVctNil(value time.Duration)
- func (m *Metrics) WitnessAddVC(value time.Duration)
- func (m *Metrics) WitnessAnchorCredentialTime(value time.Duration)
- func (m *Metrics) WitnessVerifyVCTSignature(value time.Duration)
- func (m *Metrics) WitnessWebFinger(value time.Duration)
- func (m *Metrics) WriteAnchorBuildCredentialTime(value time.Duration)
- func (m *Metrics) WriteAnchorGetPreviousAnchorsGetBulkTime(value time.Duration)
- func (m *Metrics) WriteAnchorGetPreviousAnchorsTime(value time.Duration)
- func (m *Metrics) WriteAnchorGetWitnessesTime(value time.Duration)
- func (m *Metrics) WriteAnchorPostOfferActivityTime(value time.Duration)
- func (m *Metrics) WriteAnchorResolveHostMetaLinkTime(value time.Duration)
- func (m *Metrics) WriteAnchorSignCredentialTime(value time.Duration)
- func (m *Metrics) WriteAnchorSignLocalStoreTime(value time.Duration)
- func (m *Metrics) WriteAnchorSignLocalWatchTime(value time.Duration)
- func (m *Metrics) WriteAnchorSignLocalWitnessLogTime(value time.Duration)
- func (m *Metrics) WriteAnchorSignWithLocalWitnessTime(value time.Duration)
- func (m *Metrics) WriteAnchorSignWithServerKeyTime(value time.Duration)
- func (m *Metrics) WriteAnchorTime(value time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct{}
Handler implements a Prometheus /metrics endpoint.
func NewHandler ¶
func NewHandler() *Handler
NewHandler returns a new /metrics endpoint which returns Prometheus formatted statistics.
func (*Handler) Handler ¶
func (h *Handler) Handler() common.HTTPRequestHandler
Handler returns the Handler that should be invoked when an HTTP GET is requested to the target endpoint. This Handler must be registered with an HTTP server.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics manages the metrics for Orb.
func (*Metrics) AddOperationTime ¶
AddOperationTime records the time it takes to add an operation to the queue.
func (*Metrics) AddProofParseCredential ¶
AddProofParseCredential records vct parse credential in add proof.
func (*Metrics) AddProofSign ¶
AddProofSign records vct sign in add proof.
func (*Metrics) BatchAckTime ¶
BatchAckTime records the time to acknowledge all of the operations that are removed from the queue.
func (*Metrics) BatchCutTime ¶
BatchCutTime records the time it takes to cut an operation batch. The duration is from the time that the first operation was added to the time that the batch is cut.
func (*Metrics) BatchNackTime ¶
BatchNackTime records the time to nack all of the operations that are to be placed back on the queue.
func (*Metrics) BatchRollbackTime ¶
BatchRollbackTime records the time it takes to roll back an operation batch (in case of a transient error). The duration is from the time that the first operation was added to the time that the batch is cut.
func (*Metrics) CASIncrementCacheHitCount ¶
func (m *Metrics) CASIncrementCacheHitCount()
CASIncrementCacheHitCount increments the number of CAS cache hits.
func (*Metrics) CASReadTime ¶
CASReadTime records the time it takes to read a document from CAS storage.
func (*Metrics) CASResolveTime ¶
CASResolveTime records the time it takes to resolve a document from CAS.
func (*Metrics) CASWriteTime ¶
CASWriteTime records the time it takes to write a document to CAS.
func (*Metrics) DBDeleteTime ¶
DBDeleteTime records the time it takes to delete in db.
func (*Metrics) DBGetBulkTime ¶
DBGetBulkTime records the time it takes to get bulk in db.
func (*Metrics) DBGetTagsTime ¶
DBGetTagsTime records the time it takes to get tags in db.
func (*Metrics) DBQueryTime ¶
DBQueryTime records the time it takes to query in db.
func (*Metrics) DocumentCreateUpdateTime ¶
DocumentCreateUpdateTime records the time it takes the REST handler to process a create/update operation.
func (*Metrics) DocumentResolveTime ¶
DocumentResolveTime records the time it takes the REST handler to resolve a document.
func (*Metrics) InboxHandlerTime ¶
InboxHandlerTime records the time it takes to handle an activity posted to the inbox.
func (*Metrics) OutboxIncrementActivityCount ¶
OutboxIncrementActivityCount increments the number of activities of the given type posted to the outbox.
func (*Metrics) OutboxPostTime ¶
OutboxPostTime records the time it takes to post a message to the outbox.
func (*Metrics) OutboxResolveInboxesTime ¶
OutboxResolveInboxesTime records the time it takes to resolve inboxes for an outbox post.
func (*Metrics) ProcessAnchorTime ¶
ProcessAnchorTime records the time it takes for the Observer to process an anchor credential.
func (*Metrics) ProcessDIDTime ¶
ProcessDIDTime records the time it takes for the Observer to process a DID.
func (*Metrics) ProcessWitnessedAnchorCredentialTime ¶
ProcessWitnessedAnchorCredentialTime records the time it takes to process a witnessed anchor credential by publishing it to the Observer and posting a 'Create' activity.
func (*Metrics) SignerAddLinkedDataProof ¶
SignerAddLinkedDataProof records add data linked proof.
func (*Metrics) SignerGetKey ¶
SignerGetKey records get key time.
func (*Metrics) SignerSign ¶
SignerSign records sign.
func (*Metrics) WitnessAddProof ¶
WitnessAddProof records vct witness add proof.
func (*Metrics) WitnessAddProofVctNil ¶
WitnessAddProofVctNil records vct witness.
func (*Metrics) WitnessAddVC ¶
WitnessAddVC records vct witness add vc.
func (*Metrics) WitnessAnchorCredentialTime ¶
WitnessAnchorCredentialTime records the time it takes for a verifiable credential to gather proofs from all required witnesses (according to witness policy). The start time is when the verifiable credential is issued and the end time is the time that the witness policy is satisfied.
func (*Metrics) WitnessVerifyVCTSignature ¶
WitnessVerifyVCTSignature records vct witness verify vct.
func (*Metrics) WitnessWebFinger ¶
WitnessWebFinger records vct witness web finger.
func (*Metrics) WriteAnchorBuildCredentialTime ¶
WriteAnchorBuildCredentialTime records the time it takes to build credential inside write anchor.
func (*Metrics) WriteAnchorGetPreviousAnchorsGetBulkTime ¶
WriteAnchorGetPreviousAnchorsGetBulkTime records the time it takes to get bulk inside previous anchor.
func (*Metrics) WriteAnchorGetPreviousAnchorsTime ¶
WriteAnchorGetPreviousAnchorsTime records the time it takes to get previous anchor.
func (*Metrics) WriteAnchorGetWitnessesTime ¶
WriteAnchorGetWitnessesTime records the time it takes to get witnesses inside write anchor.
func (*Metrics) WriteAnchorPostOfferActivityTime ¶
WriteAnchorPostOfferActivityTime records the time it takes to post offer activity inside write anchor.
func (*Metrics) WriteAnchorResolveHostMetaLinkTime ¶
WriteAnchorResolveHostMetaLinkTime records the time it takes to resolve host meta link.
func (*Metrics) WriteAnchorSignCredentialTime ¶
WriteAnchorSignCredentialTime records the time it takes to sign credential inside write anchor.
func (*Metrics) WriteAnchorSignLocalStoreTime ¶
WriteAnchorSignLocalStoreTime records the time it takes to store inside sign local.
func (*Metrics) WriteAnchorSignLocalWatchTime ¶
WriteAnchorSignLocalWatchTime records the time it takes to watch inside sign local.
func (*Metrics) WriteAnchorSignLocalWitnessLogTime ¶
WriteAnchorSignLocalWitnessLogTime records the time it takes to witness log inside sign local.
func (*Metrics) WriteAnchorSignWithLocalWitnessTime ¶
WriteAnchorSignWithLocalWitnessTime records the time it takes to sign with local witness.
func (*Metrics) WriteAnchorSignWithServerKeyTime ¶
WriteAnchorSignWithServerKeyTime records the time it takes to sign with server key.
func (*Metrics) WriteAnchorTime ¶
WriteAnchorTime records the time it takes to write an anchor credential and post an 'Offer' activity.