-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[hystrix-contrib/hystrix-clj] Making Command keys quantified by namespaces. #181
[hystrix-contrib/hystrix-clj] Making Command keys quantified by namespaces. #181
Conversation
This improves the Hystrix dashboard reporting information. If you have two fns with the same name in different namespaces, their command key will be the same. This messes up any monitoring using the Hystrix dashboard. It is also confusing that circuit breakers are only shown by their command key. Namespaces provide more useful information in reporting.
Hystrix-pull-requests #47 ABORTED |
I've been thinking about making this change as well. Note that you can override the name in the command metadata as well. A few considerations:
Maybe @benjchristensen can comment on the second issue? |
I don't know if Archaius would have issues with that. I believe this line in the dashboard javascript will escape the characters that would cause issues: https://github.com/Netflix/Hystrix/blob/master/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js#L91 Another consideration is that if the name is longer it will get cropped on the UI. |
I'll do a little experiment to see how archaius likes slashes and dots in command names. If that's cool, I'm good with merging. For the next release, we'll need to communicate clearly that this change is there, it will affect existing configurations. Personally, in both Java and Clojure, I've taken to always explicitly naming the commands. Otherwise, it's too easy to break things that are auto-named when refactoring. |
Everything worked fine. Merge away. Thanks @josephwilk |
[hystrix-contrib/hystrix-clj] Making Command keys quantified by namespaces.
Can one of you draft some release notes to include with this change? |
Release note draft: Breaking Change for hystrix-clj: The default command key generated by the (ns com.netflix.my-service)
(defcommand my-command ...) Will create a HystrixCommand with key
Note that the command key can be set manually with the (defcommand my-command
{:hystrix/command-key "my-command"}
... command body ...) Now the command key will be just "my-command", i.e. the behavior of hystrix-clj before this change. |
This improves the Hystrix dashboard reporting information.
If you have two fns with the same name in different namespaces,
their command key will be the same. This messes up any monitoring using the Hystrix dashboard (the two conflicting commands were trying to write to the same graph I suspect).
It is also confusing that circuit breakers are only shown by their command key.
Namespaces provide more useful information in reporting.
My only goal is to improve reporting. If this is better actioned upon in the Hystrix dashboard project, I'm happy to add a patch there.
Thanks,
Joe