{"id":13485962,"url":"https://github.com/zalando/failsafe-actuator","last_synced_at":"2025-03-27T20:32:02.577Z","repository":{"id":46929959,"uuid":"62388342","full_name":"zalando/failsafe-actuator","owner":"zalando","description":"Endpoint library for the failsafe framework","archived":true,"fork":false,"pushed_at":"2022-03-31T18:38:46.000Z","size":315,"stargazers_count":52,"open_issues_count":4,"forks_count":11,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-07-12T17:19:55.178Z","etag":null,"topics":["circuit-breaker","failsafe","monitor","monitoring","spring-boot"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zalando.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2016-07-01T11:28:10.000Z","updated_at":"2024-03-31T14:18:00.000Z","dependencies_parsed_at":"2022-09-09T11:21:06.135Z","dependency_job_id":null,"html_url":"https://github.com/zalando/failsafe-actuator","commit_stats":null,"previous_names":["zalando-incubator/failsafe-actuator"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalando%2Ffailsafe-actuator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalando%2Ffailsafe-actuator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalando%2Ffailsafe-actuator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalando%2Ffailsafe-actuator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zalando","download_url":"https://codeload.github.com/zalando/failsafe-actuator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":211145013,"owners_count":15254241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circuit-breaker","failsafe","monitor","monitoring","spring-boot"],"created_at":"2024-07-31T18:00:35.137Z","updated_at":"2024-07-31T18:01:54.610Z","avatar_url":"https://github.com/zalando.png","language":"Java","funding_links":[],"categories":["Projects","项目"],"sub_categories":["Monitoring","监测"],"readme":"[![Codacy Badge](https://api.codacy.com/project/badge/Grade/97639870e76546cab6fd2597c583c0b1)](https://www.codacy.com/app/MALPI/failsafe-actuator?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=zalando-incubator/failsafe-actuator\u0026utm_campaign=badger)\n[![Build Status](https://travis-ci.org/zalando/failsafe-actuator.svg?branch=master)](https://travis-ci.org/zalando/failsafe-actuator)\n[![Maven Central](https://img.shields.io/maven-central/v/org.zalando/failsafe-actuator.svg)](https://maven-badges.herokuapp.com/maven-central/org.zalando/failsafe-actuator)\n\n# Failsafe Actuator\n\n**Failsafe Actuator** is a Java library that provides a simple monitoring interface for [Spring Boot](https://projects.spring.io/spring-boot/) \napplications that use the [Failsafe](https://github.com/jhalterman/failsafe) library. \nUsing Failsafe Actuator will readily expose the state of your [Circuit Breakers](http://martinfowler.com/bliki/CircuitBreaker.html) (closed, open, half-open) \nto your Spring Actuator endpoint without additional effort. \n\n## Core Technical Concepts/Inspiration\n\nFailsafe Actuator supports Spring's dependency injection to make it easier to use *Failsafe*. \nIt allows you to monitor the state of your Circuit Breakers so that, whenever a third party that your app relies upon \nsuddenly becomes unavailable, you can discover it immediately and take action. This is essential for applications used in production.\n\n## Development Status/Project Roadmap\nThis library is currently under development and used in production at [Zalando](https://jobs.zalando.com/tech/). \n\nFind more details about our development plans in the [Issues Tracker](https://github.com/zalando-incubator/failsafe-actuator/issues). \n\nWe're always [looking for contributors](https://github.com/zalando-incubator/failsafe-actuator/blob/master/CONTRIBUTIONS.md), \nso if you find an interesting \"Help Wanted\" issue then please drop us a line in the related issue to claim it and begin working.\n\nUnless you explicitly state otherwise in advance, any non trivial contribution intentionally submitted for inclusion in this project by you to the steward of this repository (Zalando SE, Berlin) shall be under the terms and conditions of the MIT License, without any additional copyright information, terms or conditions.\n\n## Getting Started\n\n### Dependencies/Requirements\n* Java 8\n* [Spring Boot 2](http://projects.spring.io/spring-boot/) \n* [Failsafe](https://github.com/jhalterman/failsafe)\n\n### Running/Using\n\nTo use Failsafe Actuator, add the following dependency to your project:\n\n**Gradle:**\n```groovy\ncompile(\"org.zalando:failsafe-actuator:${FAILSAFE-ACTUATOR-VERSION}\")\n```\n\n**Maven:**\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.zalando\u003c/groupId\u003e\n    \u003cartifactId\u003efailsafe-actuator\u003c/artifactId\u003e\n    \u003cversion\u003e${failsafe-actuator.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nCreate your `CircuitBreaker` by defining them as a `Bean`.\n\n```java\n@Configuration\npublic class CircuitBreakerConfiguration {\n  @Bean\n  public CircuitBreaker myBreaker() {\n    return new CircuitBreaker();\n  }\n}\n```\n\nYou can use and configure the created `CircuitBreaker` by autowiring it in the class where it should be used.\n\n\n```java\n@Component\npublic class MyBean {\n    @Autowired\n    private CircuitBreaker myBreaker;\n}\n```\n\nThat's it. By calling the [endpoint](http://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html) via _**http://${yourAddress}/actuator/circuitbreakers**_.\nyou will get a response which looks like the following:\n\n\n```http\nGET /actuator/circuitbreakers\n\nHTTP/1.1 200\nContent-Type: application/json\n\n{\n  \"myBreaker\": {\n    \"state\": \"OPEN\"\n  },\n  \"otherBreaker\": {\n    \"state\": \"CLOSED\"\n  }\n}\n```\n\nIndividual circuit breakers can be requested via `/acutuator/circuitbreakers/{name}`:\n\n```http\nGET /actuator/circuitbreakers/myBreaker\n\nHTTP/1.1 200\nContent-Type: application/json\n\n{\n  \"state\": \"OPEN\"\n}\n```\n\nYou can even modify the circuit breaker state and manually open or close them:\n\n```http\nPOST /actuator/circuitbreakers/myBreaker\nContent-Type: application/json\n\n{\n  \"state\": \"CLOSED\"\n}\n```\n\n## Example usage\n\nTo see a complete example on how to use the library take a look at the\n[Sample Application](https://github.com/zalando/failsafe-actuator/blob/master/src/test/java/org/zalando/actuate/failsafe/SampleApplication.java).\nIt starts a [Rest Controller](https://github.com/zalando/failsafe-actuator/blob/master/src/test/java/org/zalando/actuate/failsafe/SampleController.java)\nthat shows how to autowire `CircuitBreaker` into your application\nand configure them.\n\n## How to build on your own\n\nIn order to build the JAR on your own run the following command:\n\n```bash\nmvn clean install\n```\n\n## License\n\nThis code is released under the MIT license. See [License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalando%2Ffailsafe-actuator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzalando%2Ffailsafe-actuator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalando%2Ffailsafe-actuator/lists"}