Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentinel defined feign method resource name is quite wired. #3895

Open
qingmo opened this issue Nov 18, 2024 · 0 comments
Open

sentinel defined feign method resource name is quite wired. #3895

qingmo opened this issue Nov 18, 2024 · 0 comments
Labels
area/sentinel spring cloud alibaba sentinel kind/question

Comments

@qingmo
Copy link

qingmo commented Nov 18, 2024

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。另外请按照如下要求提交相关信息节省社区维护同学的理解成本,否则该讨论极有可能直接被忽视或关闭。
We recommend using English. If you are non-native English speaker, you can use the translation software. In addition, please submit relevant information according to the following requirements to save the understanding cost of community maintenances, otherwise the discussion is very likely to be ignored or closed directly.

Which Component
Sentinel

Is your feature request related to a problem? Please describe.

I'm looking for a replacement for hystrix, after try sentinel with feign, i found is feign resource name defination way is wired.
SentinelInvocationHandler.java 102~103
String resourceName = methodMetadata.template().method().toUpperCase() + ":" + hardCodedTarget.url() + methodMetadata.template().path();
it's hard code, when i want a consist config with different environment, urls are not same, so i must use different configuration for each environment. WTF of this hard code done?

Describe the solution you'd like

I prefer to use MethodMetadata#configKey property, which is smooth compatible with hystrix.

Describe alternatives you've considered

Or just extract with a resourceNameBuild() method, let user control the config.

Additional context

If provide a annotation config way is better.

@yuluo-yx yuluo-yx added kind/question area/sentinel spring cloud alibaba sentinel labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sentinel spring cloud alibaba sentinel kind/question
Projects
None yet
Development

No branches or pull requests

2 participants