Skip to content

Commit

Permalink
Persist removal of NewNoopMeter
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Mar 22, 2023
1 parent b7152a2 commit 0314380
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
Use the added `float64` instrument configuration instead. (#3895)
- The `Int64ObserverConfig` and `NewInt64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`.
Use the added `int64` instrument configuration instead. (#3895)
- Remove `NewNoopMeter` from `go.opentelemetry.io/otel/metric`, use `NewMeterProvider.Meter("")` instead. (#3893)

## [1.15.0-rc.1/0.38.0-rc.1] 2023-03-01

Expand Down
4 changes: 2 additions & 2 deletions internal/global/instruments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func testFloat64Race(interact func(context.Context, float64, ...attribute.KeyVal
}
}()

setDelegate(metric.NewNoopMeter())
setDelegate(metric.NewNoopMeterProvider().Meter(""))
close(finish)
}

Expand All @@ -53,7 +53,7 @@ func testInt64Race(interact func(context.Context, int64, ...attribute.KeyValue),
}
}()

setDelegate(metric.NewNoopMeter())
setDelegate(metric.NewNoopMeterProvider().Meter(""))
close(finish)
}

Expand Down
5 changes: 0 additions & 5 deletions metric/noop.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ func (noopMeterProvider) Meter(string, ...MeterOption) Meter {
return noopMeter{}
}

// NewNoopMeter creates a Meter that does not record any metrics.
func NewNoopMeter() Meter {
return noopMeter{}
}

type noopMeter struct{}

func (noopMeter) Int64Counter(string, ...instrument.Int64CounterOption) (instrument.Int64Counter, error) {
Expand Down

0 comments on commit 0314380

Please sign in to comment.