@@ -558,12 +558,7 @@ private void runInternal() {
558558 future .cancel (false );
559559 return ;
560560 }
561- statsTraceCtx .serverCallStarted (
562- new ServerCallInfoImpl <>(
563- method .getMethodDescriptor (), // notify with original method descriptor
564- stream .getAttributes (),
565- stream .getAuthority ()));
566- wrapMethod = wrapMethod (method );
561+ wrapMethod = wrapMethod (stream , method , statsTraceCtx );
567562 callParams = maySwitchExecutor (wrapMethod , stream , headers , context , tag );
568563 future .set (callParams );
569564 } catch (Throwable t ) {
@@ -662,8 +657,14 @@ private Context.CancellableContext createContext(
662657 }
663658
664659 /** Never returns {@code null}. */
665- private <ReqT , RespT > ServerMethodDefinition <?,?> wrapMethod (
666- ServerMethodDefinition <ReqT , RespT > methodDef ) {
660+ private <ReqT , RespT > ServerMethodDefinition <?,?> wrapMethod (ServerStream stream ,
661+ ServerMethodDefinition <ReqT , RespT > methodDef , StatsTraceContext statsTraceCtx ) {
662+ // TODO(ejona86): should we update fullMethodName to have the canonical path of the method?
663+ statsTraceCtx .serverCallStarted (
664+ new ServerCallInfoImpl <>(
665+ methodDef .getMethodDescriptor (), // notify with original method descriptor
666+ stream .getAttributes (),
667+ stream .getAuthority ()));
667668 ServerCallHandler <ReqT , RespT > handler = methodDef .getServerCallHandler ();
668669 for (ServerInterceptor interceptor : interceptors ) {
669670 handler = InternalServerInterceptors .interceptCallHandlerCreate (interceptor , handler );
0 commit comments