[#373] metrics: Add blobstor metrics

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-06-07 18:04:23 +03:00
parent 16a142cd0c
commit 56f320dd85
7 changed files with 198 additions and 42 deletions

View file

@ -15,34 +15,24 @@ type NodeMetrics struct {
treeService *treeServiceMetrics
epoch prometheus.Gauge
fstree *fstreeMetrics
blobstore *blobstoreMetrics
}
func NewNodeMetrics() *NodeMetrics {
objectService := newObjectServiceMetrics()
engine := newEngineMetrics()
state := newStateMetrics()
replicator := newReplicatorMetrics()
treeService := newTreeServiceMetrics()
epoch := metrics.NewGauge(prometheus.GaugeOpts{
Namespace: namespace,
Subsystem: innerRingSubsystem,
Name: "epoch",
Help: "Current epoch as seen by inner-ring node.",
})
return &NodeMetrics{
objectService: objectService,
engine: engine,
state: state,
replicator: replicator,
treeService: treeService,
epoch: epoch,
fstree: newFSTreeMetrics(),
objectService: newObjectServiceMetrics(),
engine: newEngineMetrics(),
state: newStateMetrics(),
replicator: newReplicatorMetrics(),
treeService: newTreeServiceMetrics(),
epoch: metrics.NewGauge(prometheus.GaugeOpts{
Namespace: namespace,
Subsystem: innerRingSubsystem,
Name: "epoch",
Help: "Current epoch as seen by inner-ring node.",
}),
fstree: newFSTreeMetrics(),
blobstore: newBlobstoreMetrics(),
}
}
@ -74,3 +64,7 @@ func (m *NodeMetrics) State() StateMetrics {
func (m *NodeMetrics) FSTree() FSTreeMetrics {
return m.fstree
}
func (m *NodeMetrics) Blobstore() BlobstoreMetrics {
return m.blobstore
}