func NewStatsReporter()

in pkg/metrics/stats_reporter.go [39:53]


func NewStatsReporter() (StatsReporter, error) {
	meter := global.Meter(instrumentationName)

	metricCounter, err := meter.Float64Histogram(
		kmsRequestMetricName,
		metric.WithDescription("Distribution of how long it took for an operation"),
	)
	if err != nil {
		return nil, err
	}

	return &reporter{
		histogram: metricCounter,
	}, nil
}