Skip to content

WarningUnaryRequestDuration config not work #20186

Open
@ztxiuyuan

Description

@ztxiuyuan

Bug report criteria

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions