kubernetes/vendor/go.etcd.io/etcd/pkg/v3/traceutil/trace.go

const TraceKey

const StartTimeKey

type Field

func (f *Field) format() string {}

func writeFields(fields []Field) string {}

type Trace

type step

func New(op string, lg *zap.Logger, fields ...Field) *Trace {}

// TODO returns a non-nil, empty Trace
func TODO() *Trace {}

func Get(ctx context.Context) *Trace {}

func (t *Trace) GetStartTime() time.Time {}

func (t *Trace) SetStartTime(time time.Time) {}

func (t *Trace) InsertStep(at int, time time.Time, msg string, fields ...Field) {}

// StartSubTrace adds step to trace as a start sign of sublevel trace
// All steps in the subtrace will log out the input fields of this function
func (t *Trace) StartSubTrace(fields ...Field) {}

// StopSubTrace adds step to trace as a end sign of sublevel trace
// All steps in the subtrace will log out the input fields of this function
func (t *Trace) StopSubTrace(fields ...Field) {}

// Step adds step to trace
func (t *Trace) Step(msg string, fields ...Field) {}

// StepWithFunction will measure the input function as a single step
func (t *Trace) StepWithFunction(f func(), msg string, fields ...Field) {}

func (t *Trace) AddField(fields ...Field) {}

func (t *Trace) IsEmpty() bool {}

// Log dumps all steps in the Trace
func (t *Trace) Log() {}

// LogIfLong dumps logs if the duration is longer than threshold
func (t *Trace) LogIfLong(threshold time.Duration) {}

// LogAllStepsIfLong dumps all logs if the duration is longer than threshold
func (t *Trace) LogAllStepsIfLong(threshold time.Duration) {}

// LogWithStepThreshold only dumps step whose duration is longer than step threshold
func (t *Trace) LogWithStepThreshold(threshold time.Duration) {}

func (t *Trace) logInfo(threshold time.Duration) (string, []zap.Field) {}

func (t *Trace) updateFieldIfExist(f Field) bool {}

// disableStep sets the flag to prevent the trace from adding steps
func (t *Trace) disableStep() {}

// enableStep re-enable the trace to add steps
func (t *Trace) enableStep() {}