Documentation ¶
Index ¶
- func GetMetrics() metrics.Metrics
- func NewMetrics() metrics.Metrics
- func NewPrometheusProvider(httpServer *httpserver.Server) metrics.Provider
- type Handler
- type PromMetrics
- func (pm *PromMetrics) AddOperationTime(value time.Duration)
- func (pm *PromMetrics) AddOperationToBatchTime(value time.Duration)
- func (pm *PromMetrics) AddProofParseCredential(value time.Duration)
- func (pm *PromMetrics) AddProofSign(value time.Duration)
- func (pm *PromMetrics) AddUnpublishedOperationTime(value time.Duration)
- func (pm *PromMetrics) BatchCutTime(value time.Duration)
- func (pm *PromMetrics) BatchRollbackTime(value time.Duration)
- func (pm *PromMetrics) BatchSize(value float64)
- func (pm *PromMetrics) CASIncrementCacheHitCount()
- func (pm *PromMetrics) CASReadTime(casType string, value time.Duration)
- func (pm *PromMetrics) CASResolveTime(value time.Duration)
- func (pm *PromMetrics) CASWriteSize(modelType string, size int)
- func (pm *PromMetrics) CASWriteTime(value time.Duration)
- func (pm *PromMetrics) CalculateUnpublishedOperationKey(value time.Duration)
- func (pm *PromMetrics) DBBatchTime(dbType string, value time.Duration)
- func (pm *PromMetrics) DBDeleteTime(dbType string, value time.Duration)
- func (pm *PromMetrics) DBGetBulkTime(dbType string, value time.Duration)
- func (pm *PromMetrics) DBGetTagsTime(dbType string, value time.Duration)
- func (pm *PromMetrics) DBGetTime(dbType string, value time.Duration)
- func (pm *PromMetrics) DBPutTime(dbType string, value time.Duration)
- func (pm *PromMetrics) DBQueryTime(dbType string, value time.Duration)
- func (pm *PromMetrics) DecorateOperationTime(value time.Duration)
- func (pm *PromMetrics) DecorateTime(value time.Duration)
- func (pm *PromMetrics) DeleteDocumentFromCreateDocumentStoreTime(value time.Duration)
- func (pm *PromMetrics) DocumentCreateUpdateTime(value time.Duration)
- func (pm *PromMetrics) DocumentResolveTime(value time.Duration)
- func (pm *PromMetrics) ExportPublicKeyCount()
- func (pm *PromMetrics) ExportPublicKeyTime(value time.Duration)
- func (pm *PromMetrics) GetAOEndpointAndResolveDocumentFromAOTime(value time.Duration)
- func (pm *PromMetrics) GetAnchorOriginEndpointTime(value time.Duration)
- func (pm *PromMetrics) GetCreateOperationResultTime(value time.Duration)
- func (pm *PromMetrics) GetProtocolVersionTime(value time.Duration)
- func (pm *PromMetrics) GetPublishedOperations(value time.Duration)
- func (pm *PromMetrics) GetUnpublishedOperations(value time.Duration)
- func (pm *PromMetrics) HTTPCreateUpdateTime(value time.Duration)
- func (pm *PromMetrics) HTTPResolveTime(value time.Duration)
- func (pm *PromMetrics) InboxHandlerTime(activityType string, value time.Duration)
- func (pm *PromMetrics) OutboxIncrementActivityCount(activityType string)
- func (pm *PromMetrics) OutboxPostTime(value time.Duration)
- func (pm *PromMetrics) OutboxResolveInboxesTime(value time.Duration)
- func (pm *PromMetrics) ParseOperationTime(value time.Duration)
- func (pm *PromMetrics) ProcessAnchorTime(value time.Duration)
- func (pm *PromMetrics) ProcessDIDTime(value time.Duration)
- func (pm *PromMetrics) ProcessOperation(value time.Duration)
- func (pm *PromMetrics) ProcessWitnessedAnchorCredentialTime(value time.Duration)
- func (pm *PromMetrics) ProcessorResolveTime(value time.Duration)
- func (pm *PromMetrics) PutPublishedOperations(value time.Duration)
- func (pm *PromMetrics) PutUnpublishedOperation(value time.Duration)
- func (pm *PromMetrics) RequestDiscoveryTime(value time.Duration)
- func (pm *PromMetrics) ResolveDocumentFromAnchorOriginTime(value time.Duration)
- func (pm *PromMetrics) ResolveDocumentFromCreateDocumentStoreTime(value time.Duration)
- func (pm *PromMetrics) ResolveDocumentLocallyTime(value time.Duration)
- func (pm *PromMetrics) SignCount()
- func (pm *PromMetrics) SignTime(value time.Duration)
- func (pm *PromMetrics) SignerAddLinkedDataProof(value time.Duration)
- func (pm *PromMetrics) SignerGetKey(value time.Duration)
- func (pm *PromMetrics) SignerSign(value time.Duration)
- func (pm *PromMetrics) ValidateOperationTime(value time.Duration)
- func (pm *PromMetrics) VerifyCIDTime(value time.Duration)
- func (pm *PromMetrics) VerifyCount()
- func (pm *PromMetrics) VerifyTime(value time.Duration)
- func (pm *PromMetrics) WebDocumentResolveTime(value time.Duration)
- func (pm *PromMetrics) WitnessAddProof(value time.Duration)
- func (pm *PromMetrics) WitnessAddProofVctNil(value time.Duration)
- func (pm *PromMetrics) WitnessAddVC(value time.Duration)
- func (pm *PromMetrics) WitnessAnchorCredentialTime(value time.Duration)
- func (pm *PromMetrics) WitnessVerifyVCTSignature(value time.Duration)
- func (pm *PromMetrics) WitnessWebFinger(value time.Duration)
- func (pm *PromMetrics) WriteAnchorBuildCredentialTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorGetPreviousAnchorsGetBulkTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorGetPreviousAnchorsTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorGetWitnessesTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorPostOfferActivityTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorResolveHostMetaLinkTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorSignCredentialTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorSignLocalWatchTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorSignLocalWitnessLogTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorSignWithLocalWitnessTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorSignWithServerKeyTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorStoreTime(value time.Duration)
- func (pm *PromMetrics) WriteAnchorTime(value time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetrics ¶
NewMetrics creates instance of prometheus metrics.
func NewPrometheusProvider ¶
func NewPrometheusProvider(httpServer *httpserver.Server) metrics.Provider
NewPrometheusProvider creates new instance of Prometheus Metrics Provider.
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 PromMetrics ¶
type PromMetrics struct {
// contains filtered or unexported fields
}
PromMetrics manages the metrics for Orb.
func (*PromMetrics) AddOperationTime ¶
func (pm *PromMetrics) AddOperationTime(value time.Duration)
AddOperationTime records the time it takes to add an operation to the queue.
func (*PromMetrics) AddOperationToBatchTime ¶
func (pm *PromMetrics) AddOperationToBatchTime(value time.Duration)
AddOperationToBatchTime records the time to add operation to batch.
func (*PromMetrics) AddProofParseCredential ¶
func (pm *PromMetrics) AddProofParseCredential(value time.Duration)
AddProofParseCredential records vct parse credential in add proof.
func (*PromMetrics) AddProofSign ¶
func (pm *PromMetrics) AddProofSign(value time.Duration)
AddProofSign records vct sign in add proof.
func (*PromMetrics) AddUnpublishedOperationTime ¶
func (pm *PromMetrics) AddUnpublishedOperationTime(value time.Duration)
AddUnpublishedOperationTime records the time to add unpublished operation.
func (*PromMetrics) BatchCutTime ¶
func (pm *PromMetrics) BatchCutTime(value time.Duration)
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 (*PromMetrics) BatchRollbackTime ¶
func (pm *PromMetrics) BatchRollbackTime(value time.Duration)
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 (*PromMetrics) BatchSize ¶
func (pm *PromMetrics) BatchSize(value float64)
BatchSize records the size of an operation batch.
func (*PromMetrics) CASIncrementCacheHitCount ¶
func (pm *PromMetrics) CASIncrementCacheHitCount()
CASIncrementCacheHitCount increments the number of CAS cache hits.
func (*PromMetrics) CASReadTime ¶
func (pm *PromMetrics) CASReadTime(casType string, value time.Duration)
CASReadTime records the time it takes to read a document from CAS storage.
func (*PromMetrics) CASResolveTime ¶
func (pm *PromMetrics) CASResolveTime(value time.Duration)
CASResolveTime records the time it takes to resolve a document from CAS.
func (*PromMetrics) CASWriteSize ¶
func (pm *PromMetrics) CASWriteSize(modelType string, size int)
CASWriteSize the size (in bytes) of the data written to CAS for the given model type.
func (*PromMetrics) CASWriteTime ¶
func (pm *PromMetrics) CASWriteTime(value time.Duration)
CASWriteTime records the time it takes to write a document to CAS.
func (*PromMetrics) CalculateUnpublishedOperationKey ¶
func (pm *PromMetrics) CalculateUnpublishedOperationKey(value time.Duration)
CalculateUnpublishedOperationKey records the time to create unpublished operation key.
func (*PromMetrics) DBBatchTime ¶
func (pm *PromMetrics) DBBatchTime(dbType string, value time.Duration)
DBBatchTime records the time it takes to batch in db.
func (*PromMetrics) DBDeleteTime ¶
func (pm *PromMetrics) DBDeleteTime(dbType string, value time.Duration)
DBDeleteTime records the time it takes to delete in db.
func (*PromMetrics) DBGetBulkTime ¶
func (pm *PromMetrics) DBGetBulkTime(dbType string, value time.Duration)
DBGetBulkTime records the time it takes to get bulk in db.
func (*PromMetrics) DBGetTagsTime ¶
func (pm *PromMetrics) DBGetTagsTime(dbType string, value time.Duration)
DBGetTagsTime records the time it takes to get tags in db.
func (*PromMetrics) DBGetTime ¶
func (pm *PromMetrics) DBGetTime(dbType string, value time.Duration)
DBGetTime records the time it takes to get data in db.
func (*PromMetrics) DBPutTime ¶
func (pm *PromMetrics) DBPutTime(dbType string, value time.Duration)
DBPutTime records the time it takes to store data in db.
func (*PromMetrics) DBQueryTime ¶
func (pm *PromMetrics) DBQueryTime(dbType string, value time.Duration)
DBQueryTime records the time it takes to query in db.
func (*PromMetrics) DecorateOperationTime ¶
func (pm *PromMetrics) DecorateOperationTime(value time.Duration)
DecorateOperationTime records the time to decorate operation.
func (*PromMetrics) DecorateTime ¶
func (pm *PromMetrics) DecorateTime(value time.Duration)
DecorateTime records the time it takes to decorate operation (for update handler).
func (*PromMetrics) DeleteDocumentFromCreateDocumentStoreTime ¶
func (pm *PromMetrics) DeleteDocumentFromCreateDocumentStoreTime(value time.Duration)
DeleteDocumentFromCreateDocumentStoreTime records deleting document from create document store.
func (*PromMetrics) DocumentCreateUpdateTime ¶
func (pm *PromMetrics) DocumentCreateUpdateTime(value time.Duration)
DocumentCreateUpdateTime records the time it takes the REST handler to process a create/update operation.
func (*PromMetrics) DocumentResolveTime ¶
func (pm *PromMetrics) DocumentResolveTime(value time.Duration)
DocumentResolveTime records the time it takes the REST handler to resolve a document.
func (*PromMetrics) ExportPublicKeyCount ¶
func (pm *PromMetrics) ExportPublicKeyCount()
ExportPublicKeyCount increments the number of export public key hits.
func (*PromMetrics) ExportPublicKeyTime ¶
func (pm *PromMetrics) ExportPublicKeyTime(value time.Duration)
ExportPublicKeyTime records the time for export public key.
func (*PromMetrics) GetAOEndpointAndResolveDocumentFromAOTime ¶
func (pm *PromMetrics) GetAOEndpointAndResolveDocumentFromAOTime(value time.Duration)
GetAOEndpointAndResolveDocumentFromAOTime records the time it takes to get anchor origin endpoint and resolve document from anchor origin when decorating operation (for update handler).
func (*PromMetrics) GetAnchorOriginEndpointTime ¶
func (pm *PromMetrics) GetAnchorOriginEndpointTime(value time.Duration)
GetAnchorOriginEndpointTime records getting anchor origin endpoint information.
func (*PromMetrics) GetCreateOperationResultTime ¶
func (pm *PromMetrics) GetCreateOperationResultTime(value time.Duration)
GetCreateOperationResultTime records the time to create operation result response.
func (*PromMetrics) GetProtocolVersionTime ¶
func (pm *PromMetrics) GetProtocolVersionTime(value time.Duration)
GetProtocolVersionTime records the time to get protocol version.
func (*PromMetrics) GetPublishedOperations ¶
func (pm *PromMetrics) GetPublishedOperations(value time.Duration)
GetPublishedOperations records the time to get published operations for suffix.
func (*PromMetrics) GetUnpublishedOperations ¶
func (pm *PromMetrics) GetUnpublishedOperations(value time.Duration)
GetUnpublishedOperations records the time it takes to get unpublished operations for suffix.
func (*PromMetrics) HTTPCreateUpdateTime ¶
func (pm *PromMetrics) HTTPCreateUpdateTime(value time.Duration)
HTTPCreateUpdateTime records the time rest call for create or update.
func (*PromMetrics) HTTPResolveTime ¶
func (pm *PromMetrics) HTTPResolveTime(value time.Duration)
HTTPResolveTime records the time rest call for resolve.
func (*PromMetrics) InboxHandlerTime ¶
func (pm *PromMetrics) InboxHandlerTime(activityType string, value time.Duration)
InboxHandlerTime records the time it takes to handle an activity posted to the inbox.
func (*PromMetrics) OutboxIncrementActivityCount ¶
func (pm *PromMetrics) OutboxIncrementActivityCount(activityType string)
OutboxIncrementActivityCount increments the number of activities of the given type posted to the outbox.
func (*PromMetrics) OutboxPostTime ¶
func (pm *PromMetrics) OutboxPostTime(value time.Duration)
OutboxPostTime records the time it takes to post a message to the outbox.
func (*PromMetrics) OutboxResolveInboxesTime ¶
func (pm *PromMetrics) OutboxResolveInboxesTime(value time.Duration)
OutboxResolveInboxesTime records the time it takes to resolve inboxes for an outbox post.
func (*PromMetrics) ParseOperationTime ¶
func (pm *PromMetrics) ParseOperationTime(value time.Duration)
ParseOperationTime records the time to parse operation.
func (*PromMetrics) ProcessAnchorTime ¶
func (pm *PromMetrics) ProcessAnchorTime(value time.Duration)
ProcessAnchorTime records the time it takes for the Observer to process an anchor credential.
func (*PromMetrics) ProcessDIDTime ¶
func (pm *PromMetrics) ProcessDIDTime(value time.Duration)
ProcessDIDTime records the time it takes for the Observer to process a DID.
func (*PromMetrics) ProcessOperation ¶
func (pm *PromMetrics) ProcessOperation(value time.Duration)
ProcessOperation records the overall time to process operation.
func (*PromMetrics) ProcessWitnessedAnchorCredentialTime ¶
func (pm *PromMetrics) ProcessWitnessedAnchorCredentialTime(value time.Duration)
ProcessWitnessedAnchorCredentialTime records the time it takes to process a witnessed anchor credential by publishing it to the Observer and posting a 'Create' activity.
func (*PromMetrics) ProcessorResolveTime ¶
func (pm *PromMetrics) ProcessorResolveTime(value time.Duration)
ProcessorResolveTime records the time it takes for processor to resolve document when decorating operation (for update handler).
func (*PromMetrics) PutPublishedOperations ¶
func (pm *PromMetrics) PutPublishedOperations(value time.Duration)
PutPublishedOperations records the time to store published operations.
func (*PromMetrics) PutUnpublishedOperation ¶
func (pm *PromMetrics) PutUnpublishedOperation(value time.Duration)
PutUnpublishedOperation records the time it takes to store unpublished operation.
func (*PromMetrics) RequestDiscoveryTime ¶
func (pm *PromMetrics) RequestDiscoveryTime(value time.Duration)
RequestDiscoveryTime records the time it takes to request discovery.
func (*PromMetrics) ResolveDocumentFromAnchorOriginTime ¶
func (pm *PromMetrics) ResolveDocumentFromAnchorOriginTime(value time.Duration)
ResolveDocumentFromAnchorOriginTime records resolving document from anchor origin.
func (*PromMetrics) ResolveDocumentFromCreateDocumentStoreTime ¶
func (pm *PromMetrics) ResolveDocumentFromCreateDocumentStoreTime(value time.Duration)
ResolveDocumentFromCreateDocumentStoreTime records resolving document from create document store.
func (*PromMetrics) ResolveDocumentLocallyTime ¶
func (pm *PromMetrics) ResolveDocumentLocallyTime(value time.Duration)
ResolveDocumentLocallyTime records resolving document locally.
func (*PromMetrics) SignCount ¶
func (pm *PromMetrics) SignCount()
SignCount increments the number of sign hits.
func (*PromMetrics) SignTime ¶
func (pm *PromMetrics) SignTime(value time.Duration)
SignTime records the time for sign.
func (*PromMetrics) SignerAddLinkedDataProof ¶
func (pm *PromMetrics) SignerAddLinkedDataProof(value time.Duration)
SignerAddLinkedDataProof records add data linked proof.
func (*PromMetrics) SignerGetKey ¶
func (pm *PromMetrics) SignerGetKey(value time.Duration)
SignerGetKey records get key time.
func (*PromMetrics) SignerSign ¶
func (pm *PromMetrics) SignerSign(value time.Duration)
SignerSign records sign.
func (*PromMetrics) ValidateOperationTime ¶
func (pm *PromMetrics) ValidateOperationTime(value time.Duration)
ValidateOperationTime records the time to validate operation.
func (*PromMetrics) VerifyCIDTime ¶
func (pm *PromMetrics) VerifyCIDTime(value time.Duration)
VerifyCIDTime records verifying CID for document resolution.
func (*PromMetrics) VerifyCount ¶
func (pm *PromMetrics) VerifyCount()
VerifyCount increments the number of verify hits.
func (*PromMetrics) VerifyTime ¶
func (pm *PromMetrics) VerifyTime(value time.Duration)
VerifyTime records the time for verify.
func (*PromMetrics) WebDocumentResolveTime ¶
func (pm *PromMetrics) WebDocumentResolveTime(value time.Duration)
WebDocumentResolveTime records resolving web document.
func (*PromMetrics) WitnessAddProof ¶
func (pm *PromMetrics) WitnessAddProof(value time.Duration)
WitnessAddProof records vct witness add proof.
func (*PromMetrics) WitnessAddProofVctNil ¶
func (pm *PromMetrics) WitnessAddProofVctNil(value time.Duration)
WitnessAddProofVctNil records vct witness.
func (*PromMetrics) WitnessAddVC ¶
func (pm *PromMetrics) WitnessAddVC(value time.Duration)
WitnessAddVC records vct witness add vc.
func (*PromMetrics) WitnessAnchorCredentialTime ¶
func (pm *PromMetrics) WitnessAnchorCredentialTime(value time.Duration)
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 (*PromMetrics) WitnessVerifyVCTSignature ¶
func (pm *PromMetrics) WitnessVerifyVCTSignature(value time.Duration)
WitnessVerifyVCTSignature records vct witness verify vct.
func (*PromMetrics) WitnessWebFinger ¶
func (pm *PromMetrics) WitnessWebFinger(value time.Duration)
WitnessWebFinger records vct witness web finger.
func (*PromMetrics) WriteAnchorBuildCredentialTime ¶
func (pm *PromMetrics) WriteAnchorBuildCredentialTime(value time.Duration)
WriteAnchorBuildCredentialTime records the time it takes to build credential inside write anchor.
func (*PromMetrics) WriteAnchorGetPreviousAnchorsGetBulkTime ¶
func (pm *PromMetrics) WriteAnchorGetPreviousAnchorsGetBulkTime(value time.Duration)
WriteAnchorGetPreviousAnchorsGetBulkTime records the time it takes to get bulk inside previous anchor.
func (*PromMetrics) WriteAnchorGetPreviousAnchorsTime ¶
func (pm *PromMetrics) WriteAnchorGetPreviousAnchorsTime(value time.Duration)
WriteAnchorGetPreviousAnchorsTime records the time it takes to get previous anchor.
func (*PromMetrics) WriteAnchorGetWitnessesTime ¶
func (pm *PromMetrics) WriteAnchorGetWitnessesTime(value time.Duration)
WriteAnchorGetWitnessesTime records the time it takes to get witnesses inside write anchor.
func (*PromMetrics) WriteAnchorPostOfferActivityTime ¶
func (pm *PromMetrics) WriteAnchorPostOfferActivityTime(value time.Duration)
WriteAnchorPostOfferActivityTime records the time it takes to post offer activity inside write anchor.
func (*PromMetrics) WriteAnchorResolveHostMetaLinkTime ¶
func (pm *PromMetrics) WriteAnchorResolveHostMetaLinkTime(value time.Duration)
WriteAnchorResolveHostMetaLinkTime records the time it takes to resolve host meta link.
func (*PromMetrics) WriteAnchorSignCredentialTime ¶
func (pm *PromMetrics) WriteAnchorSignCredentialTime(value time.Duration)
WriteAnchorSignCredentialTime records the time it takes to sign credential inside write anchor.
func (*PromMetrics) WriteAnchorSignLocalWatchTime ¶
func (pm *PromMetrics) WriteAnchorSignLocalWatchTime(value time.Duration)
WriteAnchorSignLocalWatchTime records the time it takes to watch inside sign local.
func (*PromMetrics) WriteAnchorSignLocalWitnessLogTime ¶
func (pm *PromMetrics) WriteAnchorSignLocalWitnessLogTime(value time.Duration)
WriteAnchorSignLocalWitnessLogTime records the time it takes to witness log inside sign local.
func (*PromMetrics) WriteAnchorSignWithLocalWitnessTime ¶
func (pm *PromMetrics) WriteAnchorSignWithLocalWitnessTime(value time.Duration)
WriteAnchorSignWithLocalWitnessTime records the time it takes to sign with local witness.
func (*PromMetrics) WriteAnchorSignWithServerKeyTime ¶
func (pm *PromMetrics) WriteAnchorSignWithServerKeyTime(value time.Duration)
WriteAnchorSignWithServerKeyTime records the time it takes to sign with server key.
func (*PromMetrics) WriteAnchorStoreTime ¶
func (pm *PromMetrics) WriteAnchorStoreTime(value time.Duration)
WriteAnchorStoreTime records the time it takes to store an anchor event.
func (*PromMetrics) WriteAnchorTime ¶
func (pm *PromMetrics) WriteAnchorTime(value time.Duration)
WriteAnchorTime records the time it takes to write an anchor credential and post an 'Offer' activity.