turn-off internode in trace console (#536)

This commit is contained in:
Harshavardhana
2020-12-29 15:07:37 -08:00
committed by GitHub
parent e5c96a0787
commit eeb95b2bf6
3 changed files with 14 additions and 10 deletions

View File

@@ -48,14 +48,15 @@ type callStats struct {
Ttfb string `json:"timeToFirstByte"`
}
type serviceTraceOpts struct {
AllTraffic bool
ErrOnly bool
}
// startTraceInfo starts trace of the servers
func startTraceInfo(ctx context.Context, conn WSConn, client MinioAdmin) error {
// trace all traffic
allTraffic := true
// Trace failed requests only
errOnly := false
func startTraceInfo(ctx context.Context, conn WSConn, client MinioAdmin, opts serviceTraceOpts) error {
// Start listening on all trace activity.
traceCh := client.serviceTrace(ctx, allTraffic, errOnly)
traceCh := client.serviceTrace(ctx, opts.AllTraffic, opts.ErrOnly)
for {
select {
case <-ctx.Done():