@@ -69,14 +69,14 @@ type reportable struct {
69
69
}
70
70
71
71
func (rep * reportable ) ServerReporter (ctx context.Context , _ interface {}, typ interceptors.GRPCType , service string , method string ) (interceptors.Reporter , context.Context ) {
72
- return rep .reporter (rep .serverMetrics , nil , typ , service , method , KindServer )
72
+ return rep .reporter (ctx , rep .serverMetrics , nil , typ , service , method , KindServer )
73
73
}
74
74
75
75
func (rep * reportable ) ClientReporter (ctx context.Context , _ interface {}, typ interceptors.GRPCType , service string , method string ) (interceptors.Reporter , context.Context ) {
76
- return rep .reporter (nil , rep .clientMetrics , typ , service , method , KindClient )
76
+ return rep .reporter (ctx , nil , rep .clientMetrics , typ , service , method , KindClient )
77
77
}
78
78
79
- func (rep * reportable ) reporter (sm * ServerMetrics , cm * ClientMetrics , rpcType interceptors.GRPCType , service , method string , kind Kind ) (interceptors.Reporter , context.Context ) {
79
+ func (rep * reportable ) reporter (ctx context. Context , sm * ServerMetrics , cm * ClientMetrics , rpcType interceptors.GRPCType , service , method string , kind Kind ) (interceptors.Reporter , context.Context ) {
80
80
r := & reporter {
81
81
clientMetrics : cm ,
82
82
serverMetrics : sm ,
@@ -110,7 +110,5 @@ func (rep *reportable) reporter(sm *ServerMetrics, cm *ClientMetrics, rpcType in
110
110
}
111
111
r .serverMetrics .serverStartedCounter .WithLabelValues (string (r .typ ), r .service , r .method ).Inc ()
112
112
}
113
-
114
- // TODO: @yashrsharma44 - What should we use instead of the context.Background()?
115
- return r , context .Background ()
113
+ return r , ctx
116
114
}
0 commit comments