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

Issue #597: Rename host response time to metricshub.host.response_time #598

Conversation

NassimBtk
Copy link
Member

@NassimBtk NassimBtk commented Feb 17, 2025

This pull request includes several changes to the ProtocolHealthCheckStrategy class and related test cases, as well as a modification to the metric names in the metricshub-host-metrics.yaml file. The most important changes include renaming metrics, updating the ProtocolHealthCheckStrategy class, and enhancing test coverage.

Metric Renaming:

  • metricshub.host.up.response_time was renamed to metricshub.host.response_time in the metricshub-host-metrics.yaml file.

Updates to ProtocolHealthCheckStrategy:

  • Changed the visibility of constants UP and DOWN from public to package-private and introduced new constants UP_METRIC_FORMAT and RESPONSE_TIME_METRIC_FORMAT for metric formatting in ProtocolHealthCheckStrategy.java.
  • Refactored the run method to use the new metric format constants for collecting metrics.

Enhancements to Test Coverage:

  • Added new import statements for assertEquals, assertNotNull, and Optional in ProtocolHealthCheckStrategyTest.java.
  • Included NumberMetric import and updated the createTelemetryManagerWithTestConfig method to set strategyTime. [1] [2]
  • Enhanced the testCheckHealth method to validate the metric values and ensure the metrics are not null. [1] [2]

image

* Renamed metricshub.host.up.response_time to
metricshub.host.response_time
@NassimBtk NassimBtk merged commit 4402fc4 into main Feb 17, 2025
2 checks passed
@NassimBtk NassimBtk deleted the feature/issue-597-rename-host-response-time-metric-name-to-metricshubhostresponse_time branch February 17, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename host response time metric name to metricshub.host.response_time
2 participants