forked from TrueCloudLab/frostfs-node
[#426] cmd/neofs-node: Add metrics collector in node
Disabled by default. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
534ce03421
commit
3c0e47e6fd
4 changed files with 34 additions and 2 deletions
|
@ -299,7 +299,7 @@ func initObjectService(c *cfg) {
|
|||
)
|
||||
|
||||
// build service pipeline
|
||||
// grpc | acl | signature | response | split
|
||||
// grpc | <metrics> | acl | signature | response | split
|
||||
|
||||
splitSvc := objectService.NewTransportSplitter(
|
||||
c.cfgGRPC.maxChunkSize,
|
||||
|
@ -344,8 +344,13 @@ func initObjectService(c *cfg) {
|
|||
acl.WithNetmapState(c.cfgNetmap.state),
|
||||
)
|
||||
|
||||
var firstSvc objectService.ServiceServer = aclSvc
|
||||
if c.viper.GetBool(cfgMetricsEnable) {
|
||||
firstSvc = objectService.NewMetricCollector(aclSvc)
|
||||
}
|
||||
|
||||
objectGRPC.RegisterObjectServiceServer(c.cfgGRPC.server,
|
||||
objectTransportGRPC.New(aclSvc),
|
||||
objectTransportGRPC.New(firstSvc),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue