Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hannah Ramadan <[email protected]>
  • Loading branch information
kaylareopelle and hannahramadan authored Jan 15, 2025
1 parent 29067ea commit 05ef5e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- **Feature: Add health checks when the agent runs within Agent Control**

When the agent is started with a within an agent control environment, automatic health check files will be created within the configured file destination at the configured frequency. [PR#2995](https://github.com/newrelic/newrelic-ruby-agent/pull/2995)
When the agent is started within an agent control environment, a health check file will be created at the configured file destination for every agent process. The health check files will be updated at the configured frequency. [PR#2995](https://github.com/newrelic/newrelic-ruby-agent/pull/2995)

- **Bugfix: Stop emitting inaccurate debug-level log about deprecated configuration options**

Expand Down
2 changes: 1 addition & 1 deletion lib/new_relic/agent/health_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize
end

HEALTHY = {healthy: true, last_error: 'NR-APM-000', message: 'Healthy'}.freeze
INVALID_LICENSE_KEY = {healthy: false, last_error: 'NR-APM-001', message: 'Invalid liense key (HTTP status code 401)'}.freeze
INVALID_LICENSE_KEY = {healthy: false, last_error: 'NR-APM-001', message: 'Invalid license key (HTTP status code 401)'}.freeze
MISSING_LICENSE_KEY = {healthy: false, last_error: 'NR-APM-002', message: 'License key missing in configuration'}.freeze
FORCED_DISCONNECT = {healthy: false, last_error: 'NR-APM-003', message: 'Forced disconnect received from New Relic (HTTP status code 410)'}.freeze
HTTP_ERROR = {healthy: false, last_error: 'NR-APM-004', message: 'HTTP error response code [%s] recevied from New Relic while sending data type [%s]'}.freeze
Expand Down
2 changes: 1 addition & 1 deletion test/new_relic/agent/health_check_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_yaml_file_name_has_health_plus_uuid_without_hyphens
health_check = NewRelic::Agent::HealthCheck.new

# ex: health-bc21b5891f5e44fc9272caef924611a8.yml
assert_match(/health-(.*){32}\.ya?ml/, health_check.send(:file_name))
assert_match(/^health-[0-9a-f]{32}\.ya?ml$/, health_check.send(:file_name))
end

def test_write_file_called_on_interval
Expand Down

0 comments on commit 05ef5e4

Please sign in to comment.