func WrapScope(isReplay *bool, scope tally.Scope, clock Clock) tally.Scope {
	return &replayAwareScope{isReplay, scope, clock}
}
WrapScope wraps a scope and skip recording metrics when isReplay is true.
This is designed to be used by only by workflowEnvironmentImpl so we suppress metrics while replaying history events.
Parameter isReplay is a pointer to workflowEnvironmentImpl.isReplay which will be updated when replaying history events.
package metrics
import (
	"sync"
	"time"
	"github.com/uber-go/tally"
)
type (
	Clock interface {
		Now() time.Time
	}
	durationRecorder interface {
		RecordDuration(duration time.Duration)
	}
	replayAwareScope struct {
		isReplay *bool
		scope    tally.Scope
		clock    Clock
	}
	replayAwareCounter struct {
		isReplay *bool
		counter  tally.Counter
	}
	replayAwareGauge struct {
		isReplay *bool
		gauge    tally.Gauge
	}
	replayAwareTimer struct {
		isReplay *bool
		timer    tally.Timer
		clock    Clock
	}
	replayAwareHistogram struct {
		isReplay  *bool
		histogram tally.Histogram
		clock     Clock
	}
	replayAwareStopwatchRecorder struct {
		isReplay *bool
		recorder durationRecorder
		clock    Clock
	}
	TaggedScope struct {
		tally.Scope
		*sync.Map
	}
)