code: def submit_xmlrpc_metrics(method=None):
      
  
      def decorator(f):
          def wrapped(context, request):
              metrics = request.find_service(IMetricsService, context=None)
              metrics.increment("warehouse.xmlrpc.call", tags=[f"rpc_method:{method}"])
              with metrics.timed(
                  "warehouse.xmlrpc.timing", tags=[f"rpc_method:{method}"]
              ):
                  return f(context, request)
  
          return wrapped
  
      return decorator
docs: Submit metrics.