Repository: open-telemetry/opentelemetry-go-contrib
Pull request #2688 (2022-08-28 11:13:09)

instrumentation/otelgrpc: rename Typ to Type
`Typ` is not a reserved name. Use the correct name instead of.

zchee: cc: @ymotongpoo
codecov[bot]: # [Codecov](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2688?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) Report
> Merging [#2688](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2688?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) (6514965) into [main](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/commit/bbbd638e2b3ea59b3e37db5911e502149f1085ab?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) (bbbd638) will **not change** coverage.
> The diff coverage is `100.0%`.

[![Impacted file tree graph](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2688/graphs/tree.svg?width=650&height=150&src=pr&token=P6F3W9WA7Q&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2688?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)

```diff
@@          Coverage Diff          @@
##            main   #2688   +/-   ##
=====================================
  Coverage   74.4%   74.4%           
=====================================
  Files        145     145           
  Lines       6681    6681           
=====================================
  Hits        4973    4973           
  Misses      1561    1561           
  Partials     147     147           
```


| [Impacted Files](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2688?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | |
|---|---|---|
| [...google.golang.org/grpc/otelgrpc/filters/filters.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2688/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-aW5zdHJ1bWVudGF0aW9uL2dvb2dsZS5nb2xhbmcub3JnL2dycGMvb3RlbGdycGMvZmlsdGVycy9maWx0ZXJzLmdv) | `94.6% <100.0%> (ø)` | |
| [...ion/google.golang.org/grpc/otelgrpc/interceptor.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2688/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-aW5zdHJ1bWVudGF0aW9uL2dvb2dsZS5nb2xhbmcub3JnL2dycGMvb3RlbGdycGMvaW50ZXJjZXB0b3IuZ28=) | `84.2% <100.0%> (ø)` | |

dmathieu: Can you fix the lint issue? Also, this is changing a public attribute. So it will require a changelog entry.
zchee: will do, thanks
zchee: @dmathieu PTAL.
zchee: @MrAlias PTALA.

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dd0fab0c1..0b92503ed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
 
 ### Changed
 
+- Rename the `Typ` field of `"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc".InterceptorInfo` to `Type`. (#2688)
 - Use Go 1.19 as the default version for CI testing/linting. (#2675)
 
 ## [1.9.0/0.34.0/0.4.0] - 2022-08-02
diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/filters/filters.go b/instrumentation/google.golang.org/grpc/otelgrpc/filters/filters.go
index 90290234f..61dc9420d 100644
--- a/instrumentation/google.golang.org/grpc/otelgrpc/filters/filters.go
+++ b/instrumentation/google.golang.org/grpc/otelgrpc/filters/filters.go
@@ -32,7 +32,7 @@ type gRPCPath struct {
 // If name is not FullMethod, returned gRPCPath has empty service field.
 func splitFullMethod(i *otelgrpc.InterceptorInfo) gRPCPath {
 	var name string
-	switch i.Typ {
+	switch i.Type {
 	case otelgrpc.UnaryServer:
 		name = i.UnaryServerInfo.FullMethod
 	case otelgrpc.StreamServer:
@@ -118,7 +118,7 @@ func MethodPrefix(pre string) otelgrpc.Filter {
 func FullMethodName(n string) otelgrpc.Filter {
 	return func(i *otelgrpc.InterceptorInfo) bool {
 		var fm string
-		switch i.Typ {
+		switch i.Type {
 		case otelgrpc.UnaryClient, otelgrpc.StreamClient:
 			fm = i.Method
 		case otelgrpc.UnaryServer:
diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
index a3d2b7722..26343dfc1 100644
--- a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
+++ b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
@@ -76,7 +76,7 @@ func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor {
 	) error {
 		i := &InterceptorInfo{
 			Method: method,
-			Typ:    UnaryClient,
+			Type:   UnaryClient,
 		}
 		if cfg.Filter != nil && !cfg.Filter(i) {
 			return invoker(ctx, method, req, reply, cc, callOpts...)
@@ -255,7 +255,7 @@ func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor {
 	) (grpc.ClientStream, error) {
 		i := &InterceptorInfo{
 			Method: method,
-			Typ:    StreamClient,
+			Type:   StreamClient,
 		}
 		if cfg.Filter != nil && !cfg.Filter(i) {
 			return streamer(ctx, desc, cc, method, callOpts...)
@@ -321,7 +321,7 @@ func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor {
 	) (interface{}, error) {
 		i := &InterceptorInfo{
 			UnaryServerInfo: info,
-			Typ:             UnaryServer,
+			Type:            UnaryServer,
 		}
 		if cfg.Filter != nil && !cfg.Filter(i) {
 			return handler(ctx, req)
@@ -418,7 +418,7 @@ func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor {
 		ctx := ss.Context()
 		i := &InterceptorInfo{
 			StreamServerInfo: info,
-			Typ:              StreamServer,
+			Type:             StreamServer,
 		}
 		if cfg.Filter != nil && !cfg.Filter(i) {
 			return handler(srv, wrapServerStream(ctx, ss))
diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go b/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go
index 0d9c4d345..f6116946b 100644
--- a/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go
+++ b/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go
@@ -45,6 +45,6 @@ type InterceptorInfo struct {
 	UnaryServerInfo *grpc.UnaryServerInfo
 	// StreamServerInfo if the metadata for StreamServer
 	StreamServerInfo *grpc.StreamServerInfo
-	// Typ is the type for interceptor
-	Typ InterceptorType
+	// Type is the type for interceptor
+	Type InterceptorType
 }


Test patch:
diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/filters/filters_test.go b/instrumentation/google.golang.org/grpc/otelgrpc/filters/filters_test.go
index 0d07bf642..5ba88c56f 100644
--- a/instrumentation/google.golang.org/grpc/otelgrpc/filters/filters_test.go
+++ b/instrumentation/google.golang.org/grpc/otelgrpc/filters/filters_test.go
@@ -46,31 +46,31 @@ func TestMethodName(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "unary client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    MethodName("Hello"),
 			want: true,
 		},
 		{
 			name: "stream client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.StreamClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.StreamClient},
 			f:    MethodName("Hello"),
 			want: true,
 		},
 		{
 			name: "unary server interceptor",
-			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Typ: otelgrpc.UnaryServer},
+			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Type: otelgrpc.UnaryServer},
 			f:    MethodName("Hello"),
 			want: true,
 		},
 		{
 			name: "stream server interceptor",
-			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Typ: otelgrpc.StreamServer},
+			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Type: otelgrpc.StreamServer},
 			f:    MethodName("Hello"),
 			want: true,
 		},
 		{
 			name: "unary client interceptor fail",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    MethodName("Goodbye"),
 			want: false,
 		},
@@ -89,31 +89,31 @@ func TestMethodPrefix(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "unary client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    MethodPrefix("Foobar"),
 			want: true,
 		},
 		{
 			name: "stream client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.StreamClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.StreamClient},
 			f:    MethodPrefix("Foobar"),
 			want: true,
 		},
 		{
 			name: "unary server interceptor",
-			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Typ: otelgrpc.UnaryServer},
+			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Type: otelgrpc.UnaryServer},
 			f:    MethodPrefix("Foobar"),
 			want: true,
 		},
 		{
 			name: "stream server interceptor",
-			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Typ: otelgrpc.StreamServer},
+			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Type: otelgrpc.StreamServer},
 			f:    MethodPrefix("Foobar"),
 			want: true,
 		},
 		{
 			name: "unary client interceptor fail",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    MethodPrefix("Barfoo"),
 			want: false,
 		},
@@ -131,31 +131,31 @@ func TestFullMethodName(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "unary client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    FullMethodName(dummyFullMethodName),
 			want: true,
 		},
 		{
 			name: "stream client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.StreamClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.StreamClient},
 			f:    FullMethodName(dummyFullMethodName),
 			want: true,
 		},
 		{
 			name: "unary server interceptor",
-			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Typ: otelgrpc.UnaryServer},
+			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Type: otelgrpc.UnaryServer},
 			f:    FullMethodName(dummyFullMethodName),
 			want: true,
 		},
 		{
 			name: "stream server interceptor",
-			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Typ: otelgrpc.StreamServer},
+			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Type: otelgrpc.StreamServer},
 			f:    FullMethodName(dummyFullMethodName),
 			want: true,
 		},
 		{
 			name: "unary client interceptor fail",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    FullMethodName("/example.HelloService/Goodbye"),
 			want: false,
 		},
@@ -175,31 +175,31 @@ func TestServiceName(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "unary client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    ServiceName("example.HelloService"),
 			want: true,
 		},
 		{
 			name: "stream client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.StreamClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.StreamClient},
 			f:    ServiceName("example.HelloService"),
 			want: true,
 		},
 		{
 			name: "unary server interceptor",
-			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Typ: otelgrpc.UnaryServer},
+			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Type: otelgrpc.UnaryServer},
 			f:    ServiceName("example.HelloService"),
 			want: true,
 		},
 		{
 			name: "stream server interceptor",
-			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Typ: otelgrpc.StreamServer},
+			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Type: otelgrpc.StreamServer},
 			f:    ServiceName("example.HelloService"),
 			want: true,
 		},
 		{
 			name: "unary client interceptor fail",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    ServiceName("opentelemetry.HelloService"),
 			want: false,
 		},
@@ -218,31 +218,31 @@ func TestServicePrefix(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "unary client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    ServicePrefix("example"),
 			want: true,
 		},
 		{
 			name: "stream client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.StreamClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.StreamClient},
 			f:    ServicePrefix("example"),
 			want: true,
 		},
 		{
 			name: "unary server interceptor",
-			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Typ: otelgrpc.UnaryServer},
+			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Type: otelgrpc.UnaryServer},
 			f:    ServicePrefix("example"),
 			want: true,
 		},
 		{
 			name: "stream server interceptor",
-			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Typ: otelgrpc.StreamServer},
+			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethodName), Type: otelgrpc.StreamServer},
 			f:    ServicePrefix("example"),
 			want: true,
 		},
 		{
 			name: "unary client interceptor fail",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    ServicePrefix("opentelemetry"),
 			want: false,
 		},
@@ -260,19 +260,19 @@ func TestAny(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "unary client interceptor true && true",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    Any(MethodName("FoobarHello"), MethodPrefix("Foobar")),
 			want: true,
 		},
 		{
 			name: "unary client interceptor false && true",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    Any(MethodName("Hello"), MethodPrefix("Foobar")),
 			want: true,
 		},
 		{
 			name: "unary client interceptor false && false",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    Any(MethodName("Goodbye"), MethodPrefix("Barfoo")),
 			want: false,
 		},
@@ -290,19 +290,19 @@ func TestAll(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "unary client interceptor true && true",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    All(MethodName("FoobarHello"), MethodPrefix("Foobar")),
 			want: true,
 		},
 		{
 			name: "unary client interceptor true && false",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    All(MethodName("FoobarHello"), MethodPrefix("Barfoo")),
 			want: false,
 		},
 		{
 			name: "unary client interceptor false && false",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    All(MethodName("FoobarGoodbye"), MethodPrefix("Barfoo")),
 			want: false,
 		},
@@ -320,19 +320,19 @@ func TestNone(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "unary client interceptor true && true",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    None(MethodName("FoobarHello"), MethodPrefix("Foobar")),
 			want: false,
 		},
 		{
 			name: "unary client interceptor true && false",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    None(MethodName("FoobarHello"), MethodPrefix("Barfoo")),
 			want: false,
 		},
 		{
 			name: "unary client interceptor false && false",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    None(MethodName("FoobarGoodbye"), MethodPrefix("Barfoo")),
 			want: true,
 		},
@@ -350,19 +350,19 @@ func TestNot(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "methodname not",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    Not(MethodName("FoobarHello")),
 			want: false,
 		},
 		{
 			name: "method prefix not",
-			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Typ: otelgrpc.UnaryServer},
+			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethodName), Type: otelgrpc.UnaryServer},
 			f:    Not(MethodPrefix("FoobarHello")),
 			want: false,
 		},
 		{
 			name: "unary client interceptor not all(true && true)",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethodName, Type: otelgrpc.UnaryClient},
 			f:    Not(All(MethodName("FoobarHello"), MethodPrefix("Foobar"))),
 			want: false,
 		},
@@ -384,49 +384,49 @@ func TestHealthCheck(t *testing.T) {
 	tcs := []testCase{
 		{
 			name: "unary client interceptor healthcheck",
-			i:    &otelgrpc.InterceptorInfo{Method: healthCheck, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: healthCheck, Type: otelgrpc.UnaryClient},
 			f:    HealthCheck(),
 			want: true,
 		},
 		{
 			name: "stream client interceptor healthcheck",
-			i:    &otelgrpc.InterceptorInfo{Method: healthCheck, Typ: otelgrpc.StreamClient},
+			i:    &otelgrpc.InterceptorInfo{Method: healthCheck, Type: otelgrpc.StreamClient},
 			f:    HealthCheck(),
 			want: true,
 		},
 		{
 			name: "unary server interceptor healthcheck",
-			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(healthCheck), Typ: otelgrpc.UnaryServer},
+			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(healthCheck), Type: otelgrpc.UnaryServer},
 			f:    HealthCheck(),
 			want: true,
 		},
 		{
 			name: "stream server interceptor healthcheck",
-			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(healthCheck), Typ: otelgrpc.StreamServer},
+			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(healthCheck), Type: otelgrpc.StreamServer},
 			f:    HealthCheck(),
 			want: true,
 		},
 		{
 			name: "unary client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethod, Typ: otelgrpc.UnaryClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethod, Type: otelgrpc.UnaryClient},
 			f:    HealthCheck(),
 			want: false,
 		},
 		{
 			name: "stream client interceptor",
-			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethod, Typ: otelgrpc.StreamClient},
+			i:    &otelgrpc.InterceptorInfo{Method: dummyFullMethod, Type: otelgrpc.StreamClient},
 			f:    HealthCheck(),
 			want: false,
 		},
 		{
 			name: "unary server interceptor",
-			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethod), Typ: otelgrpc.UnaryServer},
+			i:    &otelgrpc.InterceptorInfo{UnaryServerInfo: dummyUnaryServerInfo(dummyFullMethod), Type: otelgrpc.UnaryServer},
 			f:    HealthCheck(),
 			want: false,
 		},
 		{
 			name: "stream server interceptor",
-			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethod), Typ: otelgrpc.StreamServer},
+			i:    &otelgrpc.InterceptorInfo{StreamServerInfo: dummyStreamServerInfo(dummyFullMethod), Type: otelgrpc.StreamServer},
 			f:    HealthCheck(),
 			want: false,
 		},