Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Adherence to micrometer naming conventions (#468)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve BE <[email protected]>
  • Loading branch information
johanneseschrig and stevesap authored Jun 8, 2020
1 parent 3b2374c commit d9e5e01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ private void updateFakeDelay(long realRequestDuration) {
}

/**
* Gets the current fake delay. Used for monitoring.
* Gets the current fake delay in seconds. Used for monitoring.
* @return the current fake delay
*/
public Double getFakeDelay() {
return fakeDelay;
public Double getFakeDelayInSeconds() {
return fakeDelay / 1000.;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
public class BatchCounter {

private static final String SUBMISSION_CONTROLLER_REQUESTS_COUNTER_NAME = "submissionController.requests";
private static final String SUBMISSION_CONTROLLER_REQUESTS_COUNTER_NAME = "submission_controller.requests";
private static final String SUBMISSION_CONTROLLER_REQUESTS_COUNTER_DESCRIPTION
= "Counts requests to the Submission Controller.";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@Component
@ConfigurationProperties(prefix = "services.submission.monitoring")
public class SubmissionControllerMonitor {
private static final String SUBMISSION_CONTROLLER_CURRENT_FAKE_DELAY = "submissionController.fakeDelay";
private static final String SUBMISSION_CONTROLLER_CURRENT_FAKE_DELAY = "submission_controller.fake_delay_seconds";

private final MeterRegistry meterRegistry;

Expand Down Expand Up @@ -79,7 +79,7 @@ private void initializeCounters() {
*/
public void initializeGauges(SubmissionController submissionController) {
Gauge.builder(SUBMISSION_CONTROLLER_CURRENT_FAKE_DELAY, submissionController,
__ -> submissionController.getFakeDelay())
__ -> submissionController.getFakeDelayInSeconds())
.description("The time that fake requests are delayed to make them indistinguishable from real requests.")
.register(meterRegistry);
}
Expand Down

0 comments on commit d9e5e01

Please sign in to comment.