Skip to content

Commit

Permalink
Add a metric to report selfPreservationMode
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmulcahy committed Oct 14, 2020
1 parent 821beb4 commit 38b99a4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,11 @@ public boolean isSelfPreservationModeEnabled() {
return serverConfig.shouldEnableSelfPreservation();
}

@com.netflix.servo.annotations.Monitor(name = METRIC_REGISTRY_PREFIX + "isSelfPreservationModeEnabled", type = DataSourceType.GAUGE)
public int isSelfPreservationModeEnabledMetric() {
return isSelfPreservationModeEnabled() ? 1 : 0;
}

@Override
public InstanceInfo getNextServerFromEureka(String virtualHostname, boolean secure) {
// TODO Auto-generated method stub
Expand Down

0 comments on commit 38b99a4

Please sign in to comment.