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

Move metric code to a separate package (#1321)

* Move metrics code to metric package

* Update changelog
This commit is contained in:
Krzesimir Nowak
2020-11-12 16:28:32 +01:00
committed by GitHub
parent 386331a472
commit 75d4911c95
69 changed files with 626 additions and 629 deletions

View File

@ -22,8 +22,8 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/metric"
export "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/metric/controller/controllertest"
"go.opentelemetry.io/otel/sdk/metric/controller/pull"
@ -44,7 +44,7 @@ func TestPullNoCache(t *testing.T) {
ctx := context.Background()
meter := puller.MeterProvider().Meter("nocache")
counter := otel.Must(meter).NewInt64Counter("counter.sum")
counter := metric.Must(meter).NewInt64Counter("counter.sum")
counter.Add(ctx, 10, label.String("A", "B"))
@ -81,7 +81,7 @@ func TestPullWithCache(t *testing.T) {
ctx := context.Background()
meter := puller.MeterProvider().Meter("nocache")
counter := otel.Must(meter).NewInt64Counter("counter.sum")
counter := metric.Must(meter).NewInt64Counter("counter.sum")
counter.Add(ctx, 10, label.String("A", "B"))