Issue #597: Rename host response time to metricshub.host.response_time
#598
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the
ProtocolHealthCheckStrategy
class and related test cases, as well as a modification to the metric names in themetricshub-host-metrics.yaml
file. The most important changes include renaming metrics, updating theProtocolHealthCheckStrategy
class, and enhancing test coverage.Metric Renaming:
metricshub.host.up.response_time
was renamed tometricshub.host.response_time
in themetricshub-host-metrics.yaml
file.Updates to
ProtocolHealthCheckStrategy
:UP
andDOWN
frompublic
to package-private and introduced new constantsUP_METRIC_FORMAT
andRESPONSE_TIME_METRIC_FORMAT
for metric formatting inProtocolHealthCheckStrategy.java
.run
method to use the new metric format constants for collecting metrics.Enhancements to Test Coverage:
assertEquals
,assertNotNull
, andOptional
inProtocolHealthCheckStrategyTest.java
.NumberMetric
import and updated thecreateTelemetryManagerWithTestConfig
method to setstrategyTime
. [1] [2]testCheckHealth
method to validate the metric values and ensure the metrics are not null. [1] [2]