{"action":"created","issue":{"url":"https://api.github.com/repos/alibaba/Sentinel/issues/274","repository_url":"https://api.github.com/repos/alibaba/Sentinel","labels_url":"https://api.github.com/repos/alibaba/Sentinel/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/Sentinel/issues/274/comments","events_url":"https://api.github.com/repos/alibaba/Sentinel/issues/274/events","html_url":"https://github.com/alibaba/Sentinel/issues/274","id":385637942,"node_id":"MDU6SXNzdWUzODU2Mzc5NDI=","number":274,"title":"热点参数限流根据自定义函数解析参数的结果来限流","user":{"login":"xiajunhust","id":3416389,"node_id":"MDQ6VXNlcjM0MTYzODk=","avatar_url":"https://avatars1.githubusercontent.com/u/3416389?v=4","gravatar_id":"","url":"https://api.github.com/users/xiajunhust","html_url":"https://github.com/xiajunhust","followers_url":"https://api.github.com/users/xiajunhust/followers","following_url":"https://api.github.com/users/xiajunhust/following{/other_user}","gists_url":"https://api.github.com/users/xiajunhust/gists{/gist_id}","starred_url":"https://api.github.com/users/xiajunhust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiajunhust/subscriptions","organizations_url":"https://api.github.com/users/xiajunhust/orgs","repos_url":"https://api.github.com/users/xiajunhust/repos","events_url":"https://api.github.com/users/xiajunhust/events{/privacy}","received_events_url":"https://api.github.com/users/xiajunhust/received_events","type":"User","site_admin":false},"labels":[{"id":889565428,"node_id":"MDU6TGFiZWw4ODk1NjU0Mjg=","url":"https://api.github.com/repos/alibaba/Sentinel/labels/question","name":"question","color":"c2e0c6","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-29T09:16:43Z","updated_at":"2018-11-30T07:21:06Z","closed_at":null,"author_association":"NONE","body":"<!-- Here is for bug reports and feature requests ONLY! \r\n\r\nIf you're looking for help, please check our mail list and the Gitter room.\r\n\r\nPlease try to use English to describe your issue, or at least provide a snippet of English translation.\r\n-->\r\n\r\n## Issue Description\r\n\r\n看了这里关于热点参数限流的描述，https://github.com/alibaba/Sentinel/wiki/%E7%83%AD%E7%82%B9%E5%8F%82%E6%95%B0%E9%99%90%E6%B5%81，只能指定接口的某个索引位置的参数，不能根据自定义函数解析某个参数的结果来限流，请问这个功能可以支持么？\r\n\r\nType: *feature request*\r\n\r\n### Describe what happened (or what feature you want)\r\n\r\n根据热点参数来限流可以这么做：\r\n\r\nParamFlowRule rule = new ParamFlowRule(resourceName)\r\n    .setParamIdx(0)\r\n    .setCount(5);\r\nrule.setParamFlowItemList(Collections.singletonList(item));\r\n\r\nParamFlowRuleManager.loadRules(Collections.singletonList(rule));\r\n\r\n只能指定参数的索引位置，而不能根据自定义函数解析参数的结果来限流。比如如果参数是订单号，后两位是分片位，我想取订单号后2位根据分片来限流。\r\n\r\n### Describe what you expected to happen\r\n\r\n\r\n### How to reproduce it (as minimally and precisely as possible)\r\n\r\n1. \r\n2. \r\n3. \r\n\r\n### Tell us your environment\r\n\r\n\r\n### Anything else we need to know?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/alibaba/Sentinel/issues/comments/443114774","html_url":"https://github.com/alibaba/Sentinel/issues/274#issuecomment-443114774","issue_url":"https://api.github.com/repos/alibaba/Sentinel/issues/274","id":443114774,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzExNDc3NA==","user":{"login":"sczyh30","id":9434884,"node_id":"MDQ6VXNlcjk0MzQ4ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9434884?v=4","gravatar_id":"","url":"https://api.github.com/users/sczyh30","html_url":"https://github.com/sczyh30","followers_url":"https://api.github.com/users/sczyh30/followers","following_url":"https://api.github.com/users/sczyh30/following{/other_user}","gists_url":"https://api.github.com/users/sczyh30/gists{/gist_id}","starred_url":"https://api.github.com/users/sczyh30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sczyh30/subscriptions","organizations_url":"https://api.github.com/users/sczyh30/orgs","repos_url":"https://api.github.com/users/sczyh30/repos","events_url":"https://api.github.com/users/sczyh30/events{/privacy}","received_events_url":"https://api.github.com/users/sczyh30/received_events","type":"User","site_admin":false},"created_at":"2018-11-30T07:21:06Z","updated_at":"2018-11-30T07:21:06Z","author_association":"MEMBER","body":"Using SpEL is flexible, but it's not safe and may lead to bad performance. Currently we do not support customized parameter parser, so you have to manually process the value and pass to `SphU.entry(xxx, args)`."}}
{"actor":{"display_login":"sczyh30"}}