1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-06-23 00:07:52 +02:00

Remove metric options; rename "counter" aggregator to "sum" (#541)

* Remove options (mostly)

* Rename counter aggregator to 'sum'

* Fix prometheus test

* Rewordings from feedback
This commit is contained in:
Joshua MacDonald
2020-03-11 20:21:34 -07:00
committed by GitHub
parent d9210f5676
commit 23e65ac79d
36 changed files with 368 additions and 865 deletions

View File

@ -87,26 +87,11 @@ func WrapFloat64MeasureInstrument(instrument InstrumentImpl, err error) (Float64
return Float64Measure{commonMetric: common}, err
}
// ApplyCounterOptions is a helper that applies all the counter
// options to passed opts.
func ApplyCounterOptions(opts *Options, cos ...CounterOptionApplier) {
for _, o := range cos {
o.ApplyCounterOption(opts)
}
}
// ApplyMeasureOptions is a helper that applies all the measure
// options to passed opts.
func ApplyMeasureOptions(opts *Options, mos ...MeasureOptionApplier) {
for _, o := range mos {
o.ApplyMeasureOption(opts)
}
}
// ApplyObserverOptions is a helper that applies all the observer
// options to passed opts.
func ApplyObserverOptions(opts *Options, mos ...ObserverOptionApplier) {
for _, o := range mos {
o.ApplyObserverOption(opts)
// Configure is a helper that applies all the options to a Config.
func Configure(opts []Option) Config {
var config Config
for _, o := range opts {
o.Apply(&config)
}
return config
}