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 { … }
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) { … }
func (t *Trace) StartSubTrace(fields ...Field) { … }
func (t *Trace) StopSubTrace(fields ...Field) { … }
func (t *Trace) Step(msg string, fields ...Field) { … }
func (t *Trace) StepWithFunction(f func(), msg string, fields ...Field) { … }
func (t *Trace) AddField(fields ...Field) { … }
func (t *Trace) IsEmpty() bool { … }
func (t *Trace) Log() { … }
func (t *Trace) LogIfLong(threshold time.Duration) { … }
func (t *Trace) LogAllStepsIfLong(threshold time.Duration) { … }
func (t *Trace) LogWithStepThreshold(threshold time.Duration) { … }
func (t *Trace) logInfo(threshold time.Duration) (string, []zap.Field) { … }
func (t *Trace) updateFieldIfExist(f Field) bool { … }
func (t *Trace) disableStep() { … }
func (t *Trace) enableStep() { … }