本文整理了Java中com.netflix.servo.annotations.Monitor.<init>()
方法的一些代码示例,展示了Monitor.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor.<init>()
方法的具体详情如下:
包路径:com.netflix.servo.annotations.Monitor
类名称:Monitor
方法名:<init>
暂无
代码示例来源:origin: Netflix/eureka
@com.netflix.servo.annotations.Monitor(name = METRIC_REGISTRY_PREFIX + "localRegistrySize",
description = "Count of instances in the local registry", type = DataSourceType.GAUGE)
public int localRegistrySize() {
return registrySize;
}
代码示例来源:origin: Netflix/eureka
/**
* Gets the threshold for the renewals per minute.
*
* @return the integer representing the threshold for the renewals per
* minute.
*/
@com.netflix.servo.annotations.Monitor(name = "numOfRenewsPerMinThreshold", type = DataSourceType.GAUGE)
@Override
public int getNumOfRenewsPerMinThreshold() {
return numberOfRenewsPerMinThreshold;
}
代码示例来源:origin: Netflix/eureka
@Monitor(name = METRIC_TRANSPORT_PREFIX + "quarantineSize",
description = "number of servers quarantined", type = DataSourceType.GAUGE)
public long getQuarantineSetSize() {
return quarantineSet.size();
}
}
代码示例来源:origin: Netflix/eureka
@Monitor(name = METRIC_TRANSPORT_PREFIX + "currentSessionDuration",
description = "Duration of the current session", type = DataSourceType.GAUGE)
public long getCurrentSessionDuration() {
return lastReconnectTimeStamp < 0 ? 0 : System.currentTimeMillis() - lastReconnectTimeStamp;
}
}
代码示例来源:origin: Netflix/eureka
@Monitor(name = METRIC_RESOLVER_PREFIX + "lastLoadTimestamp",
description = "How much time has passed from last successful async load", type = DataSourceType.GAUGE)
public long getLastLoadTimestamp() {
return lastLoadTimestamp < 0 ? 0 : System.currentTimeMillis() - lastLoadTimestamp;
}
代码示例来源:origin: Netflix/eureka
@Monitor(name = METRIC_RESOLVER_PREFIX + "lastReloadTimestamp",
description = "How much time has passed from last successful cluster configuration resolve", type = DataSourceType.GAUGE)
public long getLastReloadTimestamp() {
return lastReloadTimestamp < 0 ? 0 : System.currentTimeMillis() - lastReloadTimestamp;
}
}
代码示例来源:origin: Netflix/eureka
@Monitor(name = METRIC_REPLICATION_PREFIX + "queueSize", description = "Task queue size", type = DataSourceType.GAUGE)
public long getQueueSize() {
return pendingTasks.size();
}
代码示例来源:origin: Netflix/eureka
@com.netflix.servo.annotations.Monitor(name = "numOfElementsinInstanceCache", description = "Number of overrides in the instance Cache", type = DataSourceType.GAUGE)
public long getNumberofElementsininstanceCache() {
return overriddenInstanceStatusMap.size();
}
代码示例来源:origin: Netflix/eureka
@Monitor(name = METRIC_RESOLVER_PREFIX + "endpointsSize",
description = "How many records are the in the endpoints ref", type = DataSourceType.GAUGE)
public long getEndpointsSize() {
return resultsRef.get().size(); // return directly from the ref and not the method so as to not trigger warming
}
代码示例来源:origin: Netflix/eureka
/**
* Get the number of items in the response cache.
*
* @return int value representing the number of items in response cache.
*/
@Monitor(name = "responseCacheSize", type = DataSourceType.GAUGE)
public int getCurrentSize() {
return readWriteCacheMap.asMap().size();
}
代码示例来源:origin: Netflix/eureka
/**
* Servo route; do not call.
*
* @return servo data
*/
@com.netflix.servo.annotations.Monitor(name = "numOfRenewsInLastMin",
description = "Number of total heartbeats received in the last minute", type = DataSourceType.GAUGE)
@Override
public long getNumOfRenewsInLastMin() {
return renewsLastMin.getCount();
}
代码示例来源:origin: Netflix/eureka
/**
* Gets the number of <em>renewals</em> in the last minute.
*
* @return a long value representing the number of <em>renewals</em> in the last minute.
*/
@com.netflix.servo.annotations.Monitor(name = "numOfReplicationsInLastMin",
description = "Number of total replications received in the last minute",
type = com.netflix.servo.annotations.DataSourceType.GAUGE)
public long getNumOfReplicationsInLastMin() {
return numberOfReplicationsLastMin.getCount();
}
代码示例来源:origin: Netflix/eureka
@Override
@com.netflix.servo.annotations.Monitor(name = "localRegistrySize",
description = "Current registry size", type = DataSourceType.GAUGE)
public long getLocalRegistrySize() {
return super.getLocalRegistrySize();
}
}
代码示例来源:origin: Netflix/eureka
@Monitor(name = "connectionCount", type = DataSourceType.GAUGE)
public int getConnectionCount() {
return this.getConnectionsInPool();
}
代码示例来源:origin: Netflix/eureka
/**
* Gets the number of elements in the ASG cache.
*
* @return the long value representing the number of elements in the ASG
* cache.
*/
@com.netflix.servo.annotations.Monitor(name = "numOfElementsinASGCache",
description = "Number of elements in the ASG Cache", type = DataSourceType.GAUGE)
public long getNumberofElementsinASGCache() {
return asgCache.size();
}
代码示例来源:origin: Netflix/eureka
@Monitor(name = METRIC_REPLICATION_PREFIX + "reprocessQueueSize", description = "Number of tasks waiting in the reprocess queue", type = DataSourceType.GAUGE)
public long getReprocessQueueSize() {
return reprocessQueue.size();
}
代码示例来源:origin: Netflix/eureka
/**
* Gets the number of ASG queries done in the period.
*
* @return the long value representing the number of ASG queries done in the
* period.
*/
@com.netflix.servo.annotations.Monitor(name = "numOfASGQueries",
description = "Number of queries made to AWS to retrieve ASG information", type = DataSourceType.COUNTER)
public long getNumberofASGQueries() {
return asgCache.stats().loadCount();
}
代码示例来源:origin: Netflix/eureka
/**
* Gets the number of ASG queries that failed because of some reason.
*
* @return the long value representing the number of ASG queries that failed
* because of some reason.
*/
@com.netflix.servo.annotations.Monitor(name = "numOfASGQueryFailures",
description = "Number of queries made to AWS to retrieve ASG information and that failed",
type = DataSourceType.COUNTER)
public long getNumberofASGQueryFailures() {
return asgCache.stats().loadExceptionCount();
}
代码示例来源:origin: Netflix/eureka
@com.netflix.servo.annotations.Monitor(name = METRIC_REGISTRY_PREFIX + "lastSuccessfulRegistryFetchTimePeriod",
description = "How much time has passed from last successful local registry update", type = DataSourceType.GAUGE)
private long getLastSuccessfulRegistryFetchTimePeriodInternal() {
final long delay = (!clientConfig.shouldFetchRegistry() || isShutdown.get())
? 0
: getLastSuccessfulRegistryFetchTimePeriod();
registryStalenessMonitor.update(computeStalenessMonitorDelay(delay));
return delay;
}
代码示例来源:origin: Netflix/eureka
@com.netflix.servo.annotations.Monitor(name = METRIC_REGISTRATION_PREFIX + "lastSuccessfulHeartbeatTimePeriod",
description = "How much time has passed from last successful heartbeat", type = DataSourceType.GAUGE)
private long getLastSuccessfulHeartbeatTimePeriodInternal() {
final long delay = (!clientConfig.shouldRegisterWithEureka() || isShutdown.get())
? 0
: getLastSuccessfulHeartbeatTimePeriod();
heartbeatStalenessMonitor.update(computeStalenessMonitorDelay(delay));
return delay;
}
内容来源于网络,如有侵权,请联系作者删除!