Infer circuit breaker service name from class name
What does this MR do and why?
Before this change, we require classes that include the CircuitBreaker
concern to define #service_name
.
To remove that need, we are now getting the self.class.name
as the service_name
.
This changes the key that circuitbox
creates to something like:
circuits:Gitlab::Llm::Anthropic::Client:stats:1683864900:success
instead of:
circuits:anthropic:stats:1683864720:success
This is behind the circuit_breaker
feature flag.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #410694 (closed)