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:
parent
818c7b14b3
commit
d6dd84f6fa
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
4
doc.go
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"go.opentelemetry.io/otel/api/global"
|
||||
"go.opentelemetry.io/otel/global"
|
||||
"go.opentelemetry.io/otel/label"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
||||
)
|
@ -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"
|
||||
)
|
||||
|
@ -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) {
|
@ -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"
|
||||
)
|
||||
|
@ -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
|
@ -18,7 +18,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/api/global"
|
||||
"go.opentelemetry.io/otel/global"
|
||||
)
|
||||
|
||||
type testMeterProvider struct{}
|
@ -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
|
@ -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.
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
package propagators_test
|
||||
|
||||
import (
|
||||
"go.opentelemetry.io/otel/api/global"
|
||||
"go.opentelemetry.io/otel/global"
|
||||
"go.opentelemetry.io/otel/propagators"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user