mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-20 03:30:02 +02:00
Rename plugin directory to instrumentation (#779)
* Rename plugin directory to instrumentation As per https://github.com/open-telemetry/opentelemetry-specification/pull/539 * Update package paths * Fix tracer names in othttp instrumentation
This commit is contained in:
parent
3b76c770cc
commit
07d5f77749
@ -23,7 +23,7 @@ import (
|
||||
"go.opentelemetry.io/otel/api/global"
|
||||
"go.opentelemetry.io/otel/example/grpc/api"
|
||||
"go.opentelemetry.io/otel/example/grpc/config"
|
||||
"go.opentelemetry.io/otel/plugin/grpctrace"
|
||||
"go.opentelemetry.io/otel/instrumentation/grpctrace"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
"go.opentelemetry.io/otel/api/global"
|
||||
"go.opentelemetry.io/otel/example/grpc/api"
|
||||
"go.opentelemetry.io/otel/example/grpc/config"
|
||||
"go.opentelemetry.io/otel/plugin/grpctrace"
|
||||
"go.opentelemetry.io/otel/instrumentation/grpctrace"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
@ -29,7 +29,7 @@ import (
|
||||
"go.opentelemetry.io/otel/api/correlation"
|
||||
"go.opentelemetry.io/otel/api/global"
|
||||
"go.opentelemetry.io/otel/exporters/trace/stdout"
|
||||
"go.opentelemetry.io/otel/plugin/httptrace"
|
||||
"go.opentelemetry.io/otel/instrumentation/httptrace"
|
||||
sdktrace "go.opentelemetry.io/otel/sdk/trace"
|
||||
)
|
||||
|
||||
|
@ -23,7 +23,7 @@ import (
|
||||
"go.opentelemetry.io/otel/api/global"
|
||||
"go.opentelemetry.io/otel/api/trace"
|
||||
"go.opentelemetry.io/otel/exporters/trace/stdout"
|
||||
"go.opentelemetry.io/otel/plugin/httptrace"
|
||||
"go.opentelemetry.io/otel/instrumentation/httptrace"
|
||||
sdktrace "go.opentelemetry.io/otel/sdk/trace"
|
||||
)
|
||||
|
||||
|
@ -67,7 +67,7 @@ func NewClientTrace(ctx context.Context) *httptrace.ClientTrace {
|
||||
activeHooks: make(map[string]context.Context),
|
||||
}
|
||||
|
||||
ct.tr = global.Tracer("go.opentelemetry.io/otel/plugin/httptrace")
|
||||
ct.tr = global.Tracer("go.opentelemetry.io/otel/instrumentation/httptrace")
|
||||
|
||||
return &httptrace.ClientTrace{
|
||||
GetConn: ct.getConn,
|
@ -25,7 +25,7 @@ import (
|
||||
|
||||
"go.opentelemetry.io/otel/api/global"
|
||||
"go.opentelemetry.io/otel/api/kv"
|
||||
"go.opentelemetry.io/otel/plugin/httptrace"
|
||||
"go.opentelemetry.io/otel/instrumentation/httptrace"
|
||||
export "go.opentelemetry.io/otel/sdk/export/trace"
|
||||
sdktrace "go.opentelemetry.io/otel/sdk/trace"
|
||||
)
|
@ -20,7 +20,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"go.opentelemetry.io/otel/plugin/othttp"
|
||||
"go.opentelemetry.io/otel/instrumentation/othttp"
|
||||
)
|
||||
|
||||
// Any takes a list of Filters and returns a Filter that
|
@ -19,7 +19,7 @@ import (
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"go.opentelemetry.io/otel/plugin/othttp"
|
||||
"go.opentelemetry.io/otel/instrumentation/othttp"
|
||||
)
|
||||
|
||||
type scenario struct {
|
@ -20,7 +20,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"go.opentelemetry.io/otel/plugin/othttp"
|
||||
"go.opentelemetry.io/otel/instrumentation/othttp"
|
||||
)
|
||||
|
||||
// Header returns a Filter that returns true if the request
|
@ -21,7 +21,7 @@ import (
|
||||
"net/textproto"
|
||||
"strings"
|
||||
|
||||
"go.opentelemetry.io/otel/plugin/othttp"
|
||||
"go.opentelemetry.io/otel/instrumentation/othttp"
|
||||
)
|
||||
|
||||
// Header returns a Filter that returns true if the request
|
@ -57,7 +57,7 @@ func NewHandler(handler http.Handler, operation string, opts ...Option) http.Han
|
||||
}
|
||||
|
||||
defaultOpts := []Option{
|
||||
WithTracer(global.Tracer("go.opentelemetry.io/plugin/othttp")),
|
||||
WithTracer(global.Tracer("go.opentelemetry.io/otel/instrumentation/othttp")),
|
||||
WithPropagators(global.Propagators()),
|
||||
WithSpanOptions(trace.WithSpanKind(trace.SpanKindServer)),
|
||||
WithSpanNameFormatter(defaultHandlerFormatter),
|
@ -27,7 +27,7 @@ import (
|
||||
"go.opentelemetry.io/otel/api/global"
|
||||
"go.opentelemetry.io/otel/api/trace"
|
||||
"go.opentelemetry.io/otel/exporters/trace/stdout"
|
||||
"go.opentelemetry.io/otel/plugin/othttp"
|
||||
"go.opentelemetry.io/otel/instrumentation/othttp"
|
||||
sdktrace "go.opentelemetry.io/otel/sdk/trace"
|
||||
)
|
||||
|
@ -49,7 +49,7 @@ func NewTransport(base http.RoundTripper, opts ...Option) *Transport {
|
||||
}
|
||||
|
||||
defaultOpts := []Option{
|
||||
WithTracer(global.Tracer("go.opentelemetry.io/plugin/othttp")),
|
||||
WithTracer(global.Tracer("go.opentelemetry.io/otel/instrumentation/othttp")),
|
||||
WithPropagators(global.Propagators()),
|
||||
WithSpanOptions(trace.WithSpanKind(trace.SpanKindClient)),
|
||||
WithSpanNameFormatter(defaultTransportFormatter),
|
Loading…
x
Reference in New Issue
Block a user