etcd icon indicating copy to clipboard operation
etcd copied to clipboard

WarningUnaryRequestDuration config not work

Open Shuen14 opened this issue 6 months ago • 0 comments

Bug report criteria

  • [x] This bug report is not security related, security issues should be disclosed privately via etcd maintainers.
  • [x] This is not a support request or question, support requests or questions should be raised in the etcd discussion forums.
  • [ ] You have read the etcd bug reporting guidelines.
  • [x] Existing open issues along with etcd frequently asked questions have been checked and this is not a duplicate.

What happened?

When StartEtcd is called in embed, the WarningUnaryRequestDuration parameter doesn’t work, and operations that take less than 300ms are written to etcd.log

{"level":"warn","ts":"2025-06-18T17:38:53.496169+0800","caller":"v3rpc/interceptor.go:202","msg":"request stats","start time":"2025-06-18T17:38:52.902979+0800","time spent":"593.184264ms","remote":"127.0.0.1:57716","response type":"/etcdserverpb.Lease/LeaseGrant","request count":-1,"request size":-1,"response count":-1,"response size":-1,"request con
tent":""}

What did you expect to happen?

The default value of WarningUnaryRequestDuration should be assigned to DefaultWarningUnaryRequestDuration (300ms)

How can we reproduce it (as minimally and precisely as possible)?

Start etcd in embed mode, etcdctl put /test value, and see the request stats in etcd.log.

Anything else we need to know?

No response

Etcd version (please run commands below)

$ etcd --version
# paste output here

$ etcdctl version
# paste output here

Etcd configuration (command line flags or environment variables)

paste your configuration here

Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)

$ etcdctl member list -w table
# paste output here

$ etcdctl --endpoints=<member list> endpoint status -w table
# paste output here

Relevant log output


Shuen14 avatar Jun 18 '25 09:06 Shuen14