Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Dec 6, 2023
1 parent 972a7e8 commit afc87d4
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions sdk/metric/meter.go
Original file line number Diff line number Diff line change
Expand Up @@ -641,24 +641,6 @@ func (p float64InstProvider) lookupHistogram(name string, cfg metric.Float64Hist

type int64ObservProvider struct{ *meter }

func (p int64ObservProvider) lookup(kind InstrumentKind, name, desc, u string) (int64Observable, error) {
aggs, err := (int64InstProvider)(p).aggs(kind, name, desc, u)
inst := newInt64Observable(p.meter, kind, name, desc, u)
inst.appendMeasures(aggs)
return inst, err
}

func (p int64ObservProvider) registerCallbacks(m measures[int64], cBacks []metric.Int64Callback) {
if len(m) == 0 {
// Drop aggregator.
return
}

for _, cBack := range cBacks {
p.pipes.registerCallback(p.callback(m, cBack))
}
}

func (p int64ObservProvider) callback(m measures[int64], f metric.Int64Callback) func(context.Context) error {
inst := int64Observer{measures: m}
return func(ctx context.Context) error { return f(ctx, inst) }
Expand All @@ -676,24 +658,6 @@ func (o int64Observer) Observe(val int64, opts ...metric.ObserveOption) {

type float64ObservProvider struct{ *meter }

func (p float64ObservProvider) lookup(kind InstrumentKind, name, desc, u string) (float64Observable, error) {
aggs, err := (float64InstProvider)(p).aggs(kind, name, desc, u)
inst := newFloat64Observable(p.meter, kind, name, desc, u)
inst.appendMeasures(aggs)
return inst, err
}

func (p float64ObservProvider) registerCallbacks(m measures[float64], cBacks []metric.Float64Callback) {
if len(m) == 0 {
// Drop aggregator.
return
}

for _, cBack := range cBacks {
p.pipes.registerCallback(p.callback(m, cBack))
}
}

func (p float64ObservProvider) callback(m measures[float64], f metric.Float64Callback) func(context.Context) error {
inst := float64Observer{measures: m}
return func(ctx context.Context) error { return f(ctx, inst) }
Expand Down

0 comments on commit afc87d4

Please sign in to comment.