Example #1
0
func getMetrics(r request.Request) *metrics.RoundTripMetrics {
	m, ok := r.GetUserData(cbreakerMetrics)
	if !ok {
		return nil
	}
	return m.(*metrics.RoundTripMetrics)
}
Example #2
0
func (c *CircuitBreaker) shouldRecordMetrics(r request.Request) bool {
	_, ok := r.GetUserData(cbreakerRecordMetrics)
	return ok
}