1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-07-15 01:04:25 +02:00

Refactor the SDK helpers, create MeterImpl (#560)

* Create MeterImpl interface

* Checkpoint w/ sdk.go building

* Checkpoint working on global

* api/global builds (test fails)

* Test fix

* All tests pass

* Comments

* Add two tests

* Comments and uncomment tests

* Precommit part 1

* Still working on tests

* Lint

* Add a test and a TODO

* Cleanup

* Lint

* Interface()->Implementation()

* Apply some feedback

* From feedback

* (A)Synchronous -> (A)Sync

* Add a missing comment

* Apply suggestions from code review

Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>

* Rename a variable

Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>
This commit is contained in:
Joshua MacDonald
2020-03-19 12:02:46 -07:00
committed by GitHub
parent e0406dd3eb
commit d8682c1999
55 changed files with 1314 additions and 1299 deletions

View File

@ -77,11 +77,10 @@ func main() {
oneMetricCB := func(result metric.Float64ObserverResult) {
result.Observe(1, commonLabels)
}
oneMetric := metric.Must(meter).RegisterFloat64Observer("ex.com.one", oneMetricCB,
_ = metric.Must(meter).RegisterFloat64Observer("ex.com.one", oneMetricCB,
metric.WithKeys(fooKey, barKey, lemonsKey),
metric.WithDescription("An observer set to 1.0"),
)
defer oneMetric.Unregister()
measureTwo := metric.Must(meter).NewFloat64Measure("ex.com.two")