func NewMetadataPersistenceMetricsClient(persistence MetadataManager, metricClient metrics.Client, logger log.Logger) MetadataManager {
	return &metadataPersistenceClient{
		metricEmitter: metricEmitter{
			metricClient: metricClient,
			logger:       logger,
		},
		persistence: persistence,
	}
}
NewMetadataPersistenceMetricsClient creates a MetadataManager client to manage metadata
package persistence
import (
	commonpb "go.temporal.io/api/common/v1"
	"go.temporal.io/api/serviceerror"
	"go.temporal.io/server/common/log"
	"go.temporal.io/server/common/log/tag"
	"go.temporal.io/server/common/metrics"
)
type (
	metricEmitter struct {
		metricClient metrics.Client
		logger       log.Logger
	}
	shardPersistenceClient struct {
		metricEmitter
		persistence ShardManager
	}
	executionPersistenceClient struct {
		metricEmitter
		persistence ExecutionManager
	}
	taskPersistenceClient struct {
		metricEmitter
		persistence TaskManager
	}
	metadataPersistenceClient struct {
		metricEmitter
		persistence MetadataManager
	}
	clusterMetadataPersistenceClient struct {
		metricEmitter
		persistence ClusterMetadataManager
	}
	queuePersistenceClient struct {
		metricEmitter
		persistence Queue
	}
)
var _ ShardManager = (*shardPersistenceClient)(nil)
var _ ExecutionManager = (*executionPersistenceClient)(nil)
var _ TaskManager = (*taskPersistenceClient)(nil)
var _ MetadataManager = (*metadataPersistenceClient)(nil)
var _ ClusterMetadataManager = (*clusterMetadataPersistenceClient)(nil)
var _ Queue = (*queuePersistenceClient)(nil)
func NewShardPersistenceMetricsClient(persistence ShardManager, metricClient metrics.Client, logger log.Logger) ShardManager {
	return &shardPersistenceClient{
		metricEmitter: metricEmitter{
			metricClient: metricClient,
			logger:       logger,
		},
		persistence: persistence,
	}
}
func NewExecutionPersistenceMetricsClient(persistence ExecutionManager, metricClient metrics.Client, logger log.Logger) ExecutionManager {
	return &executionPersistenceClient{
		metricEmitter: metricEmitter{
			metricClient: metricClient,
			logger:       logger,
		},
		persistence: persistence,
	}
}
func NewTaskPersistenceMetricsClient(persistence TaskManager, metricClient metrics.Client, logger log.Logger) TaskManager {
	return &taskPersistenceClient{
		metricEmitter: metricEmitter{
			metricClient: metricClient,
			logger:       logger,
		},
		persistence: persistence,
	}
}