@@ -135,15 +135,10 @@ const carrierSetterAndGetter = {
135
135
set : ( carrier : Headers , key : string , value : string ) => carrier . set ( key , value )
136
136
} ;
137
137
138
- export const createClientInterceptor = (
139
- config : ConnectNodeInstrumentationConfig ,
140
- diag : DiagLogger ,
141
- tracer : Tracer ,
142
- kind : RpcKind
143
- ) => {
144
- const startSpan = createStartSpan ( config , tracer , kind ) ;
145
- const endSpanWithSuccess = createEndSpanWithSuccess ( config , kind ) ;
146
- const endSpanWithError = createEndSpanWithError ( config , kind ) ;
138
+ export const createClientInterceptor = ( config : ConnectNodeInstrumentationConfig , diag : DiagLogger , tracer : Tracer ) => {
139
+ const startSpan = createStartSpan ( config , tracer , 'client' ) ;
140
+ const endSpanWithSuccess = createEndSpanWithSuccess ( config , 'client' ) ;
141
+ const endSpanWithError = createEndSpanWithError ( config , 'client' ) ;
147
142
148
143
return ( next : InterceptorAnyFn ) : InterceptorAnyFn =>
149
144
async req => {
@@ -187,15 +182,10 @@ export const createClientInterceptor = (
187
182
} ;
188
183
} ;
189
184
190
- export const createServerInterceptor = (
191
- config : ConnectNodeInstrumentationConfig ,
192
- diag : DiagLogger ,
193
- tracer : Tracer ,
194
- kind : RpcKind
195
- ) => {
196
- const startSpan = createStartSpan ( config , tracer , kind ) ;
197
- const endSpanWithSuccess = createEndSpanWithSuccess ( config , kind ) ;
198
- const endSpanWithError = createEndSpanWithError ( config , kind ) ;
185
+ export const createServerInterceptor = ( config : ConnectNodeInstrumentationConfig , diag : DiagLogger , tracer : Tracer ) => {
186
+ const startSpan = createStartSpan ( config , tracer , 'server' ) ;
187
+ const endSpanWithSuccess = createEndSpanWithSuccess ( config , 'server' ) ;
188
+ const endSpanWithError = createEndSpanWithError ( config , 'server' ) ;
199
189
200
190
return ( next : InterceptorAnyFn ) : InterceptorAnyFn =>
201
191
async req => {
0 commit comments