mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
util: added logs for slow gRPC calls
This commit adds a gRPC middleware that logs calls that keep running after their deadline. Adds --logslowopinterval cmdline argument to pass the log rate. Signed-off-by: Robert Vasek <robert.vasek@clyso.com>
This commit is contained in:
committed by
mergify[bot]
parent
56d08e1b4d
commit
7a727c2a43
@ -179,7 +179,9 @@ func (r *Driver) Run(conf *util.Config) {
|
||||
CS: r.cs,
|
||||
NS: r.ns,
|
||||
}
|
||||
s.Start(conf.Endpoint, srv)
|
||||
s.Start(conf.Endpoint, srv, csicommon.MiddlewareServerOptionConfig{
|
||||
LogSlowOpInterval: conf.LogSlowOpInterval,
|
||||
})
|
||||
|
||||
r.startProfiling(conf)
|
||||
|
||||
@ -233,7 +235,9 @@ func (r *Driver) setupCSIAddonsServer(conf *util.Config) error {
|
||||
}
|
||||
|
||||
// start the server, this does not block, it runs a new go-routine
|
||||
err = r.cas.Start()
|
||||
err = r.cas.Start(csicommon.MiddlewareServerOptionConfig{
|
||||
LogSlowOpInterval: conf.LogSlowOpInterval,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to start CSI-Addons server: %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user