Skip to content

Commit

Permalink
remove grp changes
Browse files Browse the repository at this point in the history
  • Loading branch information
utezduyar committed Nov 7, 2023
1 parent fbaaf6d commit 20e3428
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions instrumentation/google.golang.org/grpc/otelgrpc/config.go
Expand Up @@ -24,8 +24,8 @@ import (
)

const (
// ScopeName is the instrumentation scope name.
ScopeName = "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
// instrumentationName is the name of this instrumentation package.
instrumentationName = "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
// GRPCStatusCodeKey is convention for numeric status code of a gRPC request.
GRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
)
Expand Down Expand Up @@ -73,12 +73,12 @@ func newConfig(opts []Option, role string) *config {
}

c.tracer = c.TracerProvider.Tracer(
ScopeName,
instrumentationName,
trace.WithInstrumentationVersion(SemVersion()),
)

c.meter = c.MeterProvider.Meter(
ScopeName,
instrumentationName,
metric.WithInstrumentationVersion(Version()),
metric.WithSchemaURL(semconv.SchemaURL),
)
Expand Down
Expand Up @@ -63,7 +63,7 @@ var (
func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor {
cfg := newConfig(opts, "client")
tracer := cfg.TracerProvider.Tracer(
ScopeName,
instrumentationName,
trace.WithInstrumentationVersion(Version()),
)

Expand Down Expand Up @@ -257,7 +257,7 @@ func (w *clientStream) sendStreamEvent(eventType streamEventType, err error) {
func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor {
cfg := newConfig(opts, "client")
tracer := cfg.TracerProvider.Tracer(
ScopeName,
instrumentationName,
trace.WithInstrumentationVersion(Version()),
)

Expand Down Expand Up @@ -327,7 +327,7 @@ func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor {
func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor {
cfg := newConfig(opts, "server")
tracer := cfg.TracerProvider.Tracer(
ScopeName,
instrumentationName,
trace.WithInstrumentationVersion(Version()),
)

Expand Down Expand Up @@ -448,7 +448,7 @@ func wrapServerStream(ctx context.Context, ss grpc.ServerStream, cfg *config) *s
func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor {
cfg := newConfig(opts, "server")
tracer := cfg.TracerProvider.Tracer(
ScopeName,
instrumentationName,
trace.WithInstrumentationVersion(Version()),
)

Expand Down

0 comments on commit 20e3428

Please sign in to comment.