You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-07-17 01:12:45 +02:00
Move metric api package into otel
(#1252)
* Update metric Kind to InstrumentKind * Update all the other modules with Kind rename * Update metric Descriptor with instrument Kind rename * Update other modules with Descriptor method rename * Update OTLP exporter test field name * Rename kind filenames * Add changes to CHANGELOG * Fix documentation for Grouping and PrecomputedSum * Rename meter.go to metric.go * Move descriptor.go into metric.go * Move must.go into metric.go * Move instruments into metric_instrument.go * Rename metric api_test.go to metric_test.go * Move instrumentkind_test.go into metric_test.go * Rename sdkapi.go metric_sdkapi.go * Move api/metric into otel * Update to use moved packages * Rename otel.go to error_handler.go * Add changes to CHANGELOG * Fix merge conflict resolution error
This commit is contained in:
@ -22,7 +22,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"go.opentelemetry.io/otel/api/metric"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/label"
|
||||
export "go.opentelemetry.io/otel/sdk/export/metric"
|
||||
"go.opentelemetry.io/otel/sdk/metric/controller/controllertest"
|
||||
@ -44,7 +44,7 @@ func TestPullNoCache(t *testing.T) {
|
||||
|
||||
ctx := context.Background()
|
||||
meter := puller.MeterProvider().Meter("nocache")
|
||||
counter := metric.Must(meter).NewInt64Counter("counter.sum")
|
||||
counter := otel.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 := metric.Must(meter).NewInt64Counter("counter.sum")
|
||||
counter := otel.Must(meter).NewInt64Counter("counter.sum")
|
||||
|
||||
counter.Add(ctx, 10, label.String("A", "B"))
|
||||
|
||||
|
Reference in New Issue
Block a user