The Provenance Blockchain metadata module provides comprehensive telemetry and event tracking capabilities through counters and timers that monitor object storage operations and endpoint performance. This telemetry system tracks stored objects by category and type, records all object actions (create, update, delete), and measures timing metrics for both transaction and query endpoints to provide detailed insights into metadata module operations and performance.
Counters
Stored Objects
This counter is used to get counts of things stored on the chain.
When this module writes a new object to the chain, this counter is incremented by 1. When this module deletes an object from the chain, this counter is decremented by 1. When this module updates an object on the chain, this counter is not updated.
Keys:
"metadata"
, "stored-object"
Labels:
"category"
, "object-type"
Label: Category
This label groups the objects into a general type.
The string for this label is
"category"
.Possible values:
"entry"
"specification"
"object-store-locator"
Label: Object Type
This label specifically identifies objects. Each value belongs to exactly one
"category"
label.The string for this label is
"object-type"
.Possible values:
"scope"
(is an"entry"
)
"session"
(is an"entry"
)
"record"
(is an"entry"
)
"scope-specification"
(is a"specification"
)
"contract-specification"
(is a"specification"
)
"record-specification"
(is a"specification"
)
"object-store-locator"
(is an"object-store-locator"
)
Object Actions
This counter is used to get counts of actions taken on the chain.
Every time this module writes to or deletes from the chain, this counter is incremented.
Keys:
"metadata"
, "object-action"
Labels:
"category"
, "object-type"
, "action"
Label: Category
This is the same label used by the stored object counter.
Label: Object Type
This is the same label used by the stored object counter.
Label: Action
This label defines the actions taken with respects to the various objects.
The string for this label is
"action"
.Possible values:
"created"
"updated"
"deleted"
Timers
All TX and Query endpoints have related timing metrics.
TX Keys
"metadata"
, "tx"
, {endpoint}
Example {endpoint} values:
"WriteScope"
, "DeleteContractSpecification"
, "ModifyOSLocator"
Query Keys
"metadata"
, "query"
, {endpoint}
Example {endpoint} values:
"Scope"
, "ContractSpecificationsAll"
, "OSLocatorsByScope"
Related Resources
- GitHub Repository: provenance-io/provenance
- Documentation: Provenance Blockchain Developer Portal
go// Example telemetry implementation structure // Source: https://github.com/provenance-io/provenance // Counter keys for stored objects var StoredObjectKeys = []string{"metadata", "stored-object"} // Counter keys for object actions var ObjectActionKeys = []string{"metadata", "object-action"} // Timer keys for transactions var TxKeys = []string{"metadata", "tx", endpoint} // Timer keys for queries var QueryKeys = []string{"metadata", "query", endpoint}