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

Add metricName to CircuitBreaker informations #621

Open
mcweba opened this issue Dec 18, 2024 · 0 comments
Open

Add metricName to CircuitBreaker informations #621

mcweba opened this issue Dec 18, 2024 · 0 comments
Assignees

Comments

@mcweba
Copy link
Collaborator

mcweba commented Dec 18, 2024

The CircuitBreaker provides an API to list all circuits with the current state, failRatio and path. The output looks like this:

{
  "a2e76944bdf41d97b7621d28c956d493":{
    "status":"closed",
    "infos":{
      "failRatio":0,
      "circuit":"/some/incident/tracking/events/(.*)"
    }
  },
  "6793ad399d83ffcd0168e18172304af0":{
    "status":"closed",
    "infos":{
      "failRatio":20,
      "circuit":"/some/v1/office/zips/(99989[0-1])/(.*)"
    }
  },
  "533ba84e5bd77e1a8e71c37f6c81db9a":{
    "status":"open",
    "infos":{
      "failRatio":100,
      "circuit":"/some/v1/stop-completion/"
    }
  }
}

To simplify the link between a routing rule and the corresponding CircuitBreaker values, we would like to store not only the circuit(aka path of the routing rule), but also the metricName.

The new output could look something like this:

{
  "a2e76944bdf41d97b7621d28c956d493":{
    "status":"closed",
    "infos":{
      "metric": "tracking-events",
      "failRatio":0,
      "circuit":"/some/incident/tracking/events/(.*)"
    }
  },
  "6793ad399d83ffcd0168e18172304af0":{
    "status":"closed",
    "infos":{
      "failRatio":20,
      "circuit":"/some/v1/office/zips/(99989[0-1])/(.*)"
    }
  },
  "533ba84e5bd77e1a8e71c37f6c81db9a":{
    "status":"open",
    "infos":{
      "metric": "stop-completion",
      "failRatio":100,
      "circuit":"/some/v1/stop-completion/"
    }
  }
}
@mcweba mcweba self-assigned this Dec 18, 2024
mcweba added a commit that referenced this issue Dec 23, 2024
mcweba added a commit that referenced this issue Dec 23, 2024
…r_metricName

#621 Added metric to circuit breaker entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant