{"id":47938255,"url":"https://github.com/newrelic-experimental/newrelic-java-resilience4j","last_synced_at":"2026-04-04T07:55:01.214Z","repository":{"id":322938597,"uuid":"855092752","full_name":"newrelic-experimental/newrelic-java-resilience4j","owner":"newrelic-experimental","description":"Provides instrumentation for the Resilence4j framework in the New Relic Java Agent","archived":false,"fork":false,"pushed_at":"2025-11-10T06:11:42.000Z","size":503,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-04-04T07:54:58.405Z","etag":null,"topics":["instrumentation","java","nrlabs","nrlabs-data","nrlabs-java-verify","observability","observability-data","resilience4j"],"latest_commit_sha":null,"homepage":"","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/newrelic-experimental.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":"cla.md"}},"created_at":"2024-09-10T09:43:45.000Z","updated_at":"2025-11-10T06:09:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/newrelic-experimental/newrelic-java-resilience4j","commit_stats":null,"previous_names":["newrelic-experimental/newrelic-java-resilience4j"],"tags_count":3,"template":false,"template_full_name":"newrelic-experimental/java-instrumentation-template","purl":"pkg:github/newrelic-experimental/newrelic-java-resilience4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic-experimental%2Fnewrelic-java-resilience4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic-experimental%2Fnewrelic-java-resilience4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic-experimental%2Fnewrelic-java-resilience4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic-experimental%2Fnewrelic-java-resilience4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/newrelic-experimental","download_url":"https://codeload.github.com/newrelic-experimental/newrelic-java-resilience4j/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic-experimental%2Fnewrelic-java-resilience4j/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31392188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["instrumentation","java","nrlabs","nrlabs-data","nrlabs-java-verify","observability","observability-data","resilience4j"],"created_at":"2026-04-04T07:55:00.572Z","updated_at":"2026-04-04T07:55:01.207Z","avatar_url":"https://github.com/newrelic-experimental.png","language":"Java","readme":"\u003ca href=\"https://opensource.newrelic.com/oss-category/#new-relic-experimental\"\u003e\u003cpicture\u003e\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/newrelic/opensource-website/raw/main/src/images/categories/dark/Experimental.png\"\u003e\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Experimental.png\"\u003e\u003cimg alt=\"New Relic Open Source experimental project banner.\" src=\"https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Experimental.png\"\u003e\u003c/picture\u003e\u003c/a\u003e\n\n![GitHub forks](https://img.shields.io/github/forks/newrelic-experimental/newrelic-java-resilience4j?style=social)\n![GitHub stars](https://img.shields.io/github/stars/newrelic-experimental/newrelic-java-resilience4j?style=social)\n![GitHub watchers](https://img.shields.io/github/watchers/newrelic-experimental/newrelic-java-resilience4j?style=social)\n\n![GitHub all releases](https://img.shields.io/github/downloads/newrelic-experimental/newrelic-java-resilience4j/total)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/newrelic-experimental/newrelic-java-resilience4j)\n![GitHub last commit](https://img.shields.io/github/last-commit/newrelic-experimental/newrelic-java-resilience4j)\n![GitHub Release Date](https://img.shields.io/github/release-date/newrelic-experimental/newrelic-java-resilience4j)\n\n\n![GitHub issues](https://img.shields.io/github/issues/newrelic-experimental/newrelic-java-resilience4j)\n![GitHub issues closed](https://img.shields.io/github/issues-closed/newrelic-experimental/newrelic-java-resilience4j)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/newrelic-experimental/newrelic-java-resilience4j)\n![GitHub pull requests closed](https://img.shields.io/github/issues-pr-closed/newrelic-experimental/newrelic-java-resilience4j)\n\n# New Relic Java Instrumentation for Resilience4\n\nThe following Resilience4j components are instrumented:\n\n- CircuitBreaker\n- Bulkhead\n- RateLimiter\n- Retry\n- TimeLimiter\n\n\n\n## Installation\n\nTo install:\n\n1. Download the latest release jar files.   \n2. In the New Relic Java directory (the one containing newrelic.jar), create a directory named extensions if it does not already exist.\n3. Copy the downloaded jars into the extensions directory.\n4. Restart the application.\n\n## Resilience4j Metrics Collection \n\nThis module also collects and reports metrics from Resilience4j components (Circuit Breaker, Bulkhead, ThreadPool Bulkhead, Rate Limiter, and Retry) using New Relic Agent APIs. The metrics are periodically collected and sent to New Relic Insights as custom events.\n\n\n\n\n### Configuration\n\nTo enable (default: true) /disable specific metrics collection and set the polling interval ( default: 1 minute ) , update the `newrelic.yml` configuration file with the following parameters:\n\n```yaml\nResilience4j:\n  metrics:\n    # Circuit Breaker Metrics\n    circuitbreaker:\n      enabled: true\n      intervalminutes: 5\n\n    # Bulkhead Metrics\n    bulkhead:\n      enabled: true\n      intervalminutes: 5\n\n    # ThreadPool Bulkhead Metrics\n    threadpoolbulkhead:\n      enabled: true\n      intervalminutes: 5\n\n    # Rate Limiter Metrics\n    ratelimiter:\n      enabled: true\n      intervalminutes: 5\n\n    # Retry Metrics\n    retry:\n      enabled: true\n      intervalminutes: 5\n```\n\nThese settings should be added to your `newrelic.yml` configuration file. This configuration enables metrics collection for each Resilience4j component and sets the polling interval to 5 minutes. Adjust the `intervalminutes` value as needed to set a different polling interval.\n      \n### Usage\n**Enable Metrics Collection:** Set the appropriate flags in the newrelic.yml file to enable metrics collection for the desired Resilience4j components.\n\n**Set Polling Interval:** Configure the polling interval (in minutes) for each component's metrics collection.\n\n**Run the Application:** Start your application. The metrics will be collected at the specified intervals and sent to New Relic Insights as custom events.\n\n**Monitor Metrics in New Relic:** Log in to your New Relic account and navigate to the Insights section to view the custom events for the metrics collected.\n\nThis setup helps you monitor the performance and reliability of your Resilience4j components in real-time using New Relic's powerful monitoring and alerting capabilities.\n\n## Custom Event Tables in New Relic Platform\n\nThe metrics collected from each Resilience4j pattern are reported as custom events to New Relic Insights. Below are the custom event tables where you can find the reported metrics:\n\n\n### CircuitBreakerMetrics\n\n- **Custom Event Table Name**: `CircuitBreakerMetrics`\n- **Metrics**:\n  - `Name`\n  - `FailureRate`\n  - `BufferedCalls`\n  - `Failed`\n  - `NotPermittedCalls`\n  - `SlowCalls`\n  - `SuccessfulCalls`\n  - `SlowCallRate`\n  - `SlowFailedCalls`\n  - `SlowSuccessfulCalls`\n    \n### BulkheadMetrics\n\n- **Custom Event Table Name**: `BulkheadMetrics`\n- **Metrics**:\n  - `Name`\n  - `AvailableConcurrentCalls`\n  - `MaxAllowedConcurrentCalls`\n \n### ThreadPoolBulkheadMetrics\n\n- **Custom Event Table Name**: `ThreadPoolBulkheadMetrics`\n- **Metrics**:\n  - `Name`\n  - `CoreThreadPoolSize`\n  - `ThreadPoolSize`\n  - `MaximumThreadPoolSize`\n  - `QueueDepth`\n  - `RemainingQueueCapacity`\n  - `QueueCapacity`\n### RetryMetrics\n\n- **Custom Event Table Name**: `RetryMetrics`\n- **Metrics**:\n  - `Name`\n  - `NumberOfSuccessfulCallsWithoutRetryAttempt`\n  - `NumberOfFailedCallsWithoutRetryAttempt`\n  - `NumberOfSuccessfulCallsWithRetryAttempt`\n  - `NumberOfFailedCallsWithRetryAttempt`\n\n\n\n### RateLimiterMetrics\n\n- **Custom Event Table Name**: `RateLimiterMetrics`\n- **Metrics**:\n  - `Name`\n  - `AvailablePermissions`\n  - `NumberOfWaitingThreads`\n\n\n\n## Accessing Custom Events in New Relic Insights\n\n1. **Log in to New Relic**: Access your New Relic account.\n2. **Query Custom Events**: Use the following NRQL (New Relic Query Language) queries to access the custom events:\n\n   - **ThreadPoolBulkheadMetrics**:\n     ```sql\n     SELECT * FROM ThreadPoolBulkheadMetrics\n     ```\n\n   - **RetryMetrics**:\n     ```sql\n     SELECT * FROM RetryMetrics\n     ```\n\n   - **CircuitBreakerMetrics**:\n     ```sql\n     SELECT * FROM CircuitBreakerMetrics\n     ```\n\n   - **RateLimiterMetrics**:\n     ```sql\n     SELECT * FROM RateLimiterMetrics\n     ```\n\n   - **BulkheadMetrics**:\n     ```sql\n     SELECT * FROM BulkheadMetrics\n     ```\n\nThese queries will display the custom events along with the collected metrics, allowing you to monitor and analyze the performance and reliability of your Resilience4j components in real-time.\n## Getting Started\n\nOnce installed, the instrumentation will track transactions through the Resilience4j components.\n\n## Building\n\nBuilding the extension requires that Gradle is installed.\nTo build the extension jars from source, follow these steps:\n### Build single extension\nTo build a single extension with name *extension*, do the following:\n1. Set an environment variable *NEW_RELIC_EXTENSIONS_DIR* and set its value to the directory where you want the jar file built.\n2. Run the command: ./gradlew *extension*:clean *extension*:install\n### Build all extensions\nTo build all extensions, do the following:\n1. Set an environment variable *NEW_RELIC_EXTENSIONS_DIR* and set its value to the directory where you want the jar file built.\n2. Run the command: ./gradlew clean install\n\n## Support\n\nNew Relic has open-sourced this project. This project is provided AS-IS WITHOUT WARRANTY OR DEDICATED SUPPORT. Issues and contributions should be reported to the project here on GitHub.\n\n\u003eWe encourage you to bring your experiences and questions to the [Explorers Hub](https://discuss.newrelic.com) where our community members collaborate on solutions and new ideas.\n\n## Contributing\n\nWe encourage your contributions to improve [Project Name]! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at opensource@newrelic.com.\n\n**A note about vulnerabilities**\n\nAs noted in our [security policy](../../security/policy), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.\n\nIf you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through [HackerOne](https://hackerone.com/newrelic).\n\n## License\n\nNew Relic Java Instrumentation for resilience4 is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License.\n\n\u003e[If applicable: [Project Name] also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.]\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewrelic-experimental%2Fnewrelic-java-resilience4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnewrelic-experimental%2Fnewrelic-java-resilience4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewrelic-experimental%2Fnewrelic-java-resilience4j/lists"}