1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-20 03:30:02 +02:00

Move the otel/api/global package to otel/global (#1262)

* Move otel/api/global to otel/global

* Update global package references

* Add changes to CHANGELOG
This commit is contained in:
Tyler Yahn 2020-10-17 10:03:48 -07:00 committed by GitHub
parent 818c7b14b3
commit d6dd84f6fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 47 additions and 46 deletions

View File

@ -31,6 +31,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Move the `go.opentelemetry.io/otel/api/metric`, `go.opentelemetry.io/otel/api/metric/metrictest`, and `go.opentelemetry.io/otel/api/metric/registry` packages into `go.opentelemetry.io/otel` as part of #964. (#1252)
- The function signature of the Span `AddEvent` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required name and a variable number of `EventOption`s. (#1254)
- The function signature of the Span `RecordError` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required error value and a variable number of `EventOption`s. (#1254)
- Move the `go.opentelemetry.io/otel/api/global` package to `go.opentelemetry.io/otel/global`. (#1262)
### Removed

View File

@ -26,8 +26,8 @@ import (
otlog "github.com/opentracing/opentracing-go/log"
"go.opentelemetry.io/otel"
otelglobal "go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/codes"
otelglobal "go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/internal/baggage"
"go.opentelemetry.io/otel/internal/trace/noop"
otelparent "go.opentelemetry.io/otel/internal/trace/parent"

View File

@ -22,7 +22,7 @@ import (
ot "github.com/opentracing/opentracing-go"
"go.opentelemetry.io/otel"
otelglobal "go.opentelemetry.io/otel/api/global"
otelglobal "go.opentelemetry.io/otel/global"
otelbaggage "go.opentelemetry.io/otel/internal/baggage"
"go.opentelemetry.io/otel/label"

4
doc.go
View File

@ -42,8 +42,8 @@ operation being performed as part of a traced workflow. It its simplest form:
A Tracer is unique to the instrumentation and is used to create Spans.
Instrumentation should be designed to accept a TracerProvider from which it
can create its own unique Tracer. Alternatively, the registered global
TracerProvider from the go.opentelemetry.io/otel/api/global package can be
used as a default.
TracerProvider from the go.opentelemetry.io/otel/global package can be used as
a default.
const (
name = "instrumentation/package/name"

View File

@ -19,8 +19,8 @@ import (
"log"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/exporters/stdout"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/propagators"
"go.opentelemetry.io/otel/sdk/metric/controller/push"

View File

@ -20,7 +20,7 @@ import (
"context"
"log"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/exporters/trace/jaeger"

View File

@ -18,7 +18,7 @@ import (
"context"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
)

View File

@ -19,9 +19,9 @@ import (
"log"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/example/namedtracer/foo"
"go.opentelemetry.io/otel/exporters/stdout"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)

View File

@ -26,8 +26,8 @@ import (
"google.golang.org/grpc"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/exporters/otlp"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/propagators"
"go.opentelemetry.io/otel/sdk/metric/controller/push"

View File

@ -23,8 +23,8 @@ import (
"time"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/exporters/metric/prometheus"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
)

View File

@ -23,7 +23,7 @@ import (
"os"
"time"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/exporters/trace/zipkin"
sdktrace "go.opentelemetry.io/otel/sdk/trace"

View File

@ -24,7 +24,7 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
export "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/export/metric/aggregation"

View File

@ -22,8 +22,8 @@ import (
"google.golang.org/grpc/credentials"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/exporters/otlp"
"go.opentelemetry.io/otel/global"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)

View File

@ -19,8 +19,8 @@ import (
"log"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/exporters/stdout"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
)

View File

@ -16,7 +16,7 @@ package stdout
import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/sdk/export/metric"
exporttrace "go.opentelemetry.io/otel/sdk/export/trace"
"go.opentelemetry.io/otel/sdk/metric/controller/push"

View File

@ -20,7 +20,7 @@ import (
"strconv"
"strings"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
)

View File

@ -23,9 +23,9 @@ import (
"google.golang.org/api/support/bundler"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/codes"
gen "go.opentelemetry.io/otel/exporters/trace/jaeger/internal/gen-go/jaeger"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
export "go.opentelemetry.io/otel/sdk/export/trace"
sdktrace "go.opentelemetry.io/otel/sdk/trace"

View File

@ -29,9 +29,9 @@ import (
"google.golang.org/api/support/bundler"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/codes"
gen "go.opentelemetry.io/otel/exporters/trace/jaeger/internal/gen-go/jaeger"
"go.opentelemetry.io/otel/global"
ottest "go.opentelemetry.io/otel/internal/testing"
"go.opentelemetry.io/otel/label"
export "go.opentelemetry.io/otel/sdk/export/trace"

View File

@ -26,7 +26,7 @@ import (
"net/url"
"sync"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
export "go.opentelemetry.io/otel/sdk/export/trace"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)

View File

@ -31,8 +31,8 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/global"
export "go.opentelemetry.io/otel/sdk/export/trace"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)

View File

@ -13,4 +13,4 @@
// limitations under the License.
// Package global provides global providers, propagators and more.
package global // import "go.opentelemetry.io/otel/api/global"
package global // import "go.opentelemetry.io/otel/global"

View File

@ -18,8 +18,8 @@ import (
"context"
"testing"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/global/internal"
"go.opentelemetry.io/otel/label"
)

View File

@ -18,7 +18,7 @@ import (
"os"
"testing"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/global/internal"
ottest "go.opentelemetry.io/otel/internal/testing"
)

View File

@ -22,8 +22,8 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/global/internal"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/oteltest"
)

View File

@ -18,7 +18,7 @@ import (
"context"
"testing"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/global/internal"
"go.opentelemetry.io/otel/oteltest"
)

View File

@ -17,7 +17,7 @@ package internal_test
import (
"testing"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/global/internal"
)
func TestResetsOfGlobalsPanic(t *testing.T) {

View File

@ -20,8 +20,8 @@ import (
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/global/internal"
"go.opentelemetry.io/otel/oteltest"
)

View File

@ -16,7 +16,7 @@ package global
import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/global/internal"
)
// Meter creates an implementation of the Meter interface from the global

View File

@ -18,7 +18,7 @@ import (
"testing"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
)
type testMeterProvider struct{}

View File

@ -16,7 +16,7 @@ package global
import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/global/internal"
)
// TextMapPropagator returns the global TextMapPropagator. If none has been

View File

@ -16,7 +16,7 @@ package global
import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/global/internal"
)
// Tracer creates a named tracer that implements Tracer interface.

View File

@ -18,7 +18,7 @@ import (
"testing"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/internal/trace/noop"
)

View File

@ -21,7 +21,7 @@ import (
"sync"
api "go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
)

View File

@ -15,7 +15,7 @@
package propagators_test
import (
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/propagators"
)

View File

@ -21,7 +21,7 @@ import (
"testing"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
export "go.opentelemetry.io/otel/sdk/export/metric"
sdk "go.opentelemetry.io/otel/sdk/metric"

View File

@ -20,7 +20,7 @@ import (
"time"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/registry"
export "go.opentelemetry.io/otel/sdk/export/metric"
sdk "go.opentelemetry.io/otel/sdk/metric"

View File

@ -25,7 +25,7 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
export "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/export/metric/aggregation"

View File

@ -24,7 +24,7 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
export "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/export/metric/aggregation"

View File

@ -23,7 +23,7 @@ import (
"go.opentelemetry.io/otel"
api "go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
internal "go.opentelemetry.io/otel/internal/metric"
"go.opentelemetry.io/otel/label"
export "go.opentelemetry.io/otel/sdk/export/metric"

View File

@ -21,7 +21,7 @@ import (
"sync/atomic"
"time"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
export "go.opentelemetry.io/otel/sdk/export/trace"
)

View File

@ -17,7 +17,7 @@ package trace
import (
"context"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/global"
export "go.opentelemetry.io/otel/sdk/export/trace"
)

View File

@ -22,8 +22,8 @@ import (
"time"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
export "go.opentelemetry.io/otel/sdk/export/trace"
"go.opentelemetry.io/otel/sdk/internal"

View File

@ -26,8 +26,8 @@ import (
"time"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/oteltest"