{"id":25301774,"url":"https://github.com/ahus1/prometheus-hystrix","last_synced_at":"2025-04-04T20:14:49.123Z","repository":{"id":15386200,"uuid":"18117782","full_name":"ahus1/prometheus-hystrix","owner":"ahus1","description":"This is an implementation of a HystrixMetricsPublisher that publishes metrics using the Prometheus java client.","archived":false,"fork":false,"pushed_at":"2025-02-27T17:32:49.000Z","size":262,"stargazers_count":102,"open_issues_count":1,"forks_count":36,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-03-28T19:11:22.420Z","etag":null,"topics":["hystrix","java","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahus1.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-03-25T21:49:41.000Z","updated_at":"2025-02-27T17:32:45.000Z","dependencies_parsed_at":"2023-02-10T10:00:56.085Z","dependency_job_id":"4966aa46-afa0-4e65-8d79-ed593adb463f","html_url":"https://github.com/ahus1/prometheus-hystrix","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahus1%2Fprometheus-hystrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahus1%2Fprometheus-hystrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahus1%2Fprometheus-hystrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahus1%2Fprometheus-hystrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahus1","download_url":"https://codeload.github.com/ahus1/prometheus-hystrix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242680,"owners_count":20907134,"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":["hystrix","java","prometheus","prometheus-exporter"],"created_at":"2025-02-13T06:49:04.228Z","updated_at":"2025-04-04T20:14:49.106Z","avatar_url":"https://github.com/ahus1.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= prometheus-hystrix-metrics-publisher\n\nThis is an implementation of a http://netflix.github.com/Hystrix/javadoc/index.html?com/netflix/hystrix/strategy/metrics/HystrixMetricsPublisher.html[HystrixMetricsPublisher]\nthat publishes metrics using Prometheus' https://github.com/prometheus/client_java[SimpleClient].\n\nimage:https://img.shields.io/maven-central/v/de.ahus1.prometheus.hystrix/prometheus-hystrix.svg[link=https://mvnrepository.com/artifact/de.ahus1.prometheus.hystrix/prometheus-hystrix]\nimage:https://github.com/ahus1/prometheus-hystrix/workflows/Java%20CI%20with%20Maven/badge.svg?branch=master[Build Status,link=https://github.com/ahus1/prometheus-hystrix/actions?query=workflow%3A%22Java+CI+with+Maven%22+branch%3Amaster]\n\nSee the https://github.com/Netflix/Hystrix/wiki/Metrics-and-Monitoring[Netflix Metrics \u0026amp; Monitoring] Wiki for more information.\n\n_This continues the work started at SoundCloud._\n\nThe roadmap is the following:\n\n* Adopt best practices in https://prometheus.io/docs/practices/naming/[naming metrics].\n\n* Support ongoing development\n\nNon-Goals:\n\n* merge this project with https://github.com/prometheus/client_java[Prometheus Java Simple Client], as Hystrix is in maintenance mode and is no longer actively developed by Netflix, see the https://github.com/Netflix/Hystrix#hystrix-status[Status message in its GitHub repo].\n\nTo use this library you can use Java 6, 7 or 8. Later versions should work, but have not been tested yet - please create it ticket if you experience problems.\n\nContinuous integration tests run on Java 8 only, but the build is parameterized to be Java 6 compatible.\nAnimal sniffer is part of the build to ensure no APIs that are not part of JDK 6 are used.\n\n== USAGE\n\nInclude the most recent release from Maven Central in your build configuration.\n\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.ahus1.prometheus.hystrix\u003c/groupId\u003e\n    \u003cartifactId\u003eprometheus-hystrix\u003c/artifactId\u003e\n    \u003cversion\u003e4.x.x\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\nRegister the metrics publisher for your application's namespace and the default Prometheus CollectorRegistry with Hystrix.\n\n[source,java]\n----\nimport com.soundcloud.prometheus.hystrix.HystrixPrometheusMetricsPublisher;\n\n// ...\n\nHystrixPrometheusMetricsPublisher.register();\n----\n\nRegister the publisher for your application's namespace with your own Prometheus CollectorRegistry with Hystrix.\n\n[source,java]\n----\nimport com.soundcloud.prometheus.hystrix.HystrixPrometheusMetricsPublisher;\nimport io.prometheus.client.CollectorRegistry;\n\n// ...\n\nCollectorRegistry registry = // ...\nHystrixPrometheusMetricsPublisher.builder().withRegistry(registry).buildAndRegister();\n----\n\nFor all advanced options, please use the _.builder()_ like in the previous example.\n\n== STATISTICS\n\nMost metrics are similar to the standard Hystrix are straightforward to use.\n\nThe events emitted by each _HystrixCommand_ might need a little bit more explanation:\nEach _HystrixCommand_ can create multiple events, but only one _terminal_ event.\nThe following provides the rate of each event type per command:\n\n----\nirate(hystrix_command_event_total [1m])\n----\n\nThe following provides the percentage of the events over all commands:\n\n----\nirate(hystrix_command_event_total [1m])\n/ ignoring(event) group_left\nsum(irate(hystrix_command_event_total{terminal='true'} [1m]))\n  by (command_group, command_name, instance, job, terminal)\n----\n\nYou can add the following suffix condition to hide all events that never happened in your environment:\n\n----\n... AND hystrix_command_event_total \u003e 0\n----\n\n== DEVELOPMENT\n\nRun `./mvnw package` to compile, test and JARs locally.\n\nThe most recent development version (based on the _master_ branch on GitHub) is available from the Sonatype OSS Snapshot Repository.\nTo use it, include the following repository in your _pom.xml_.\n\nTo preview the contents in your browser, use the following link: +\nhttps://oss.sonatype.org/content/repositories/snapshots/de/ahus1/prometheus/hystrix/prometheus-hystrix/\n\n[source,xml]\n----\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003esnapshots-repo\u003c/id\u003e\n        \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n        \u003creleases\u003e\u003cenabled\u003efalse\u003c/enabled\u003e\u003c/releases\u003e\n        \u003csnapshots\u003e\u003cenabled\u003etrue\u003c/enabled\u003e\u003c/snapshots\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n----\n\n== LICENSE\n\nCopyright 2014-2017 SoundCloud, Inc., Alexander Schwartz and Authors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0[http://www.apache.org/licenses/LICENSE-2.0]\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahus1%2Fprometheus-hystrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahus1%2Fprometheus-hystrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahus1%2Fprometheus-hystrix/lists"}