etcd icon indicating copy to clipboard operation
etcd copied to clipboard

etcdserver: debug logs for v3

Open jiaxuanzhou opened this issue 9 years ago • 4 comments

In production environment, when we want to debug requests from the clients, I found there is no debug logs when add flag --debug, but same flag with v2, it can print the detail info of the put and get requests of the keys. So, i wonder if it is a feature to eclispe debug logs for v3? if not , should we add some debug logs in v3_server and etcdserver.pb for debugging key events in real time when there is need to solve some bugs for apps which store keys in etcd v3.

jiaxuanzhou avatar Aug 18 '17 01:08 jiaxuanzhou

@jiaxuanzhou have you tried http://etcd:2379/debug/requests/ and http://etcd:2379/debug/events?

heyitsanthony avatar Aug 18 '17 19:08 heyitsanthony

@heyitsanthony thanks a lot

jiaxuanzhou avatar Aug 21 '17 03:08 jiaxuanzhou

@heyitsanthony does the /debug/requests endpoint exist in etcd release 3.1 ? If not, is there a way to log incoming read/write requests for v3 store in etcd 3.1 ?

ahakanbaba avatar May 15 '18 07:05 ahakanbaba

@ahakanbaba it's in 3.2 (https://github.com/coreos/etcd/blob/release-3.2/embed/serve.go#L241) but not 3.1 (https://github.com/coreos/etcd/blob/release-3.1/embed/serve.go#L188). There's no nice logging mechanism for v3 requests in 3.1 afaik.

heyitsanthony avatar May 17 '18 22:05 heyitsanthony