Add error filter to admin trace API (#7923)

This allows MinIO to have the ability to send back only error trace
This commit is contained in:
poornas authored and kannappanr committed 2019-07-20 01:38:26 +01:00
1 parent 559a59220e
commit 0373a1699b
7 files changed
+42 -8

No files matched your search

+2 -1
View File
@@ -32,7 +32,7 @@ type TraceInfo struct {
}
// Trace - listen on http trace notifications.
func (adm AdminClient) Trace(allTrace bool, doneCh <-chan struct{}) <-chan TraceInfo {
func (adm AdminClient) Trace(allTrace, errTrace bool, doneCh <-chan struct{}) <-chan TraceInfo {
traceInfoCh := make(chan TraceInfo)
// Only success, start a routine to start reading line by line.
go func(traceInfoCh chan<- TraceInfo) {
@@ -40,6 +40,7 @@ func (adm AdminClient) Trace(allTrace bool, doneCh <-chan struct{}) <-chan Trace
for {
urlValues := make(url.Values)
urlValues.Set("all", strconv.FormatBool(allTrace))
urlValues.Set("err", strconv.FormatBool(errTrace))
reqData := requestData{
relPath: "/v1/trace",
queryValues: urlValues,