You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ch...@apache.org on 2019/03/28 09:02:59 UTC
[incubator-openwhisk] branch master updated: Replace count suffix
with counter (#4395)
This is an automated email from the ASF dual-hosted git repository.
chetanm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 13f542f Replace count suffix with counter (#4395)
13f542f is described below
commit 13f542f5df02661c2b9ccd08b95e7bc33e8aad0e
Author: Su <su...@gmail.com>
AuthorDate: Thu Mar 28 10:02:52 2019 +0100
Replace count suffix with counter (#4395)
Due to Graphite convention metric names ending with `count` are aggregated with max which is not desirable in some cases. So change the name to use a neutral suffix
---
.../org/apache/openwhisk/common/Logging.scala | 55 ++++++++++++----------
.../apache/openwhisk/http/BasicHttpService.scala | 2 +-
docs/metrics.md | 14 +++---
3 files changed, 37 insertions(+), 34 deletions(-)
diff --git a/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala
index 1a336fc..859c5d6 100644
--- a/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala
+++ b/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala
@@ -338,7 +338,7 @@ object LoggingMarkers {
val start = "start"
val finish = "finish"
val error = "error"
- val count = "count"
+ val counter = "counter"
val timeout = "timeout"
private val controller = "controller"
@@ -352,7 +352,7 @@ object LoggingMarkers {
/*
* Controller related markers
*/
- def CONTROLLER_STARTUP(id: String) = LogMarkerToken(controller, s"startup$id", count)(MeasurementUnit.none)
+ def CONTROLLER_STARTUP(id: String) = LogMarkerToken(controller, s"startup$id", counter)(MeasurementUnit.none)
// Time of the activation in controller until it is delivered to Kafka
val CONTROLLER_ACTIVATION =
@@ -360,7 +360,7 @@ object LoggingMarkers {
val CONTROLLER_ACTIVATION_BLOCKING =
LogMarkerToken(controller, "blockingActivation", start)(MeasurementUnit.time.milliseconds)
val CONTROLLER_ACTIVATION_BLOCKING_DATABASE_RETRIEVAL =
- LogMarkerToken(controller, "blockingActivationDatabaseRetrieval", count)(MeasurementUnit.none)
+ LogMarkerToken(controller, "blockingActivationDatabaseRetrieval", counter)(MeasurementUnit.none)
// Time that is needed to load balance the activation
val CONTROLLER_LOADBALANCER = LogMarkerToken(controller, loadbalancer, start)(MeasurementUnit.none)
@@ -369,23 +369,24 @@ object LoggingMarkers {
val CONTROLLER_KAFKA = LogMarkerToken(controller, kafka, start)(MeasurementUnit.time.milliseconds)
// System overload and random invoker assignment
- val MANAGED_SYSTEM_OVERLOAD = LogMarkerToken(controller, "managedInvokerSystemOverload", count)(MeasurementUnit.none)
+ val MANAGED_SYSTEM_OVERLOAD =
+ LogMarkerToken(controller, "managedInvokerSystemOverload", counter)(MeasurementUnit.none)
val BLACKBOX_SYSTEM_OVERLOAD =
- LogMarkerToken(controller, "blackBoxInvokerSystemOverload", count)(MeasurementUnit.none)
+ LogMarkerToken(controller, "blackBoxInvokerSystemOverload", counter)(MeasurementUnit.none)
/*
* Invoker related markers
*/
- def INVOKER_STARTUP(i: Int) = LogMarkerToken(invoker, s"startup$i", count)(MeasurementUnit.none)
+ def INVOKER_STARTUP(i: Int) = LogMarkerToken(invoker, s"startup$i", counter)(MeasurementUnit.none)
// Check invoker healthy state from loadbalancer
def LOADBALANCER_INVOKER_STATUS_CHANGE(state: String) =
- LogMarkerToken(loadbalancer, "invokerState", count, Some(state))(MeasurementUnit.none)
- val LOADBALANCER_ACTIVATION_START = LogMarkerToken(loadbalancer, "activations", count)(MeasurementUnit.none)
+ LogMarkerToken(loadbalancer, "invokerState", counter, Some(state))(MeasurementUnit.none)
+ val LOADBALANCER_ACTIVATION_START = LogMarkerToken(loadbalancer, "activations", counter)(MeasurementUnit.none)
def LOADBALANCER_ACTIVATIONS_INFLIGHT(controllerInstance: ControllerInstanceId) =
- LogMarkerToken(loadbalancer + controllerInstance.asString, "activationsInflight", count)(MeasurementUnit.none)
+ LogMarkerToken(loadbalancer + controllerInstance.asString, "activationsInflight", counter)(MeasurementUnit.none)
def LOADBALANCER_MEMORY_INFLIGHT(controllerInstance: ControllerInstanceId, actionType: String) =
- LogMarkerToken(loadbalancer + controllerInstance.asString, s"memory${actionType}Inflight", count)(
+ LogMarkerToken(loadbalancer + controllerInstance.asString, s"memory${actionType}Inflight", counter)(
MeasurementUnit.none)
// Time that is needed to execute the action
@@ -415,40 +416,42 @@ object LoggingMarkers {
def INVOKER_MESOS_CMD_TIMEOUT(cmd: String) =
LogMarkerToken(invoker, "mesos", timeout, Some(cmd), Map("cmd" -> cmd))(MeasurementUnit.none)
def INVOKER_CONTAINER_START(containerState: String) =
- LogMarkerToken(invoker, "containerStart", count, Some(containerState), Map("containerState" -> containerState))(
+ LogMarkerToken(invoker, "containerStart", counter, Some(containerState), Map("containerState" -> containerState))(
MeasurementUnit.none)
val CONTAINER_CLIENT_RETRIES =
- LogMarkerToken(containerClient, "retries", count)(MeasurementUnit.none)
+ LogMarkerToken(containerClient, "retries", counter)(MeasurementUnit.none)
- val INVOKER_TOTALMEM_BLACKBOX = LogMarkerToken(loadbalancer, "totalCapacityBlackBox", count)(MeasurementUnit.none)
- val INVOKER_TOTALMEM_MANAGED = LogMarkerToken(loadbalancer, "totalCapacityManaged", count)(MeasurementUnit.none)
+ val INVOKER_TOTALMEM_BLACKBOX = LogMarkerToken(loadbalancer, "totalCapacityBlackBox", counter)(MeasurementUnit.none)
+ val INVOKER_TOTALMEM_MANAGED = LogMarkerToken(loadbalancer, "totalCapacityManaged", counter)(MeasurementUnit.none)
- val HEALTHY_INVOKER_MANAGED = LogMarkerToken(loadbalancer, "totalHealthyInvokerManaged", count)(MeasurementUnit.none)
+ val HEALTHY_INVOKER_MANAGED =
+ LogMarkerToken(loadbalancer, "totalHealthyInvokerManaged", counter)(MeasurementUnit.none)
val UNHEALTHY_INVOKER_MANAGED =
- LogMarkerToken(loadbalancer, "totalUnhealthyInvokerManaged", count)(MeasurementUnit.none)
+ LogMarkerToken(loadbalancer, "totalUnhealthyInvokerManaged", counter)(MeasurementUnit.none)
val UNRESPONSIVE_INVOKER_MANAGED =
- LogMarkerToken(loadbalancer, "totalUnresponsiveInvokerManaged", count)(MeasurementUnit.none)
- val OFFLINE_INVOKER_MANAGED = LogMarkerToken(loadbalancer, "totalOfflineInvokerManaged", count)(MeasurementUnit.none)
+ LogMarkerToken(loadbalancer, "totalUnresponsiveInvokerManaged", counter)(MeasurementUnit.none)
+ val OFFLINE_INVOKER_MANAGED =
+ LogMarkerToken(loadbalancer, "totalOfflineInvokerManaged", counter)(MeasurementUnit.none)
val HEALTHY_INVOKER_BLACKBOX =
- LogMarkerToken(loadbalancer, "totalHealthyInvokerBlackBox", count)(MeasurementUnit.none)
+ LogMarkerToken(loadbalancer, "totalHealthyInvokerBlackBox", counter)(MeasurementUnit.none)
val UNHEALTHY_INVOKER_BLACKBOX =
- LogMarkerToken(loadbalancer, "totalUnhealthyInvokerBlackBox", count)(MeasurementUnit.none)
+ LogMarkerToken(loadbalancer, "totalUnhealthyInvokerBlackBox", counter)(MeasurementUnit.none)
val UNRESPONSIVE_INVOKER_BLACKBOX =
- LogMarkerToken(loadbalancer, "totalUnresponsiveInvokerBlackBox", count)(MeasurementUnit.none)
+ LogMarkerToken(loadbalancer, "totalUnresponsiveInvokerBlackBox", counter)(MeasurementUnit.none)
val OFFLINE_INVOKER_BLACKBOX =
- LogMarkerToken(loadbalancer, "totalOfflineInvokerBlackBox", count)(MeasurementUnit.none)
+ LogMarkerToken(loadbalancer, "totalOfflineInvokerBlackBox", counter)(MeasurementUnit.none)
// Kafka related markers
- def KAFKA_QUEUE(topic: String) = LogMarkerToken(kafka, topic, count)(MeasurementUnit.none)
+ def KAFKA_QUEUE(topic: String) = LogMarkerToken(kafka, topic, counter)(MeasurementUnit.none)
def KAFKA_MESSAGE_DELAY(topic: String) =
LogMarkerToken(kafka, topic, start, Some("delay"))(MeasurementUnit.time.milliseconds)
/*
* General markers
*/
- val DATABASE_CACHE_HIT = LogMarkerToken(database, "cacheHit", count)(MeasurementUnit.none)
- val DATABASE_CACHE_MISS = LogMarkerToken(database, "cacheMiss", count)(MeasurementUnit.none)
+ val DATABASE_CACHE_HIT = LogMarkerToken(database, "cacheHit", counter)(MeasurementUnit.none)
+ val DATABASE_CACHE_MISS = LogMarkerToken(database, "cacheMiss", counter)(MeasurementUnit.none)
val DATABASE_SAVE =
LogMarkerToken(database, "saveDocument", start)(MeasurementUnit.time.milliseconds)
val DATABASE_BULK_SAVE =
@@ -465,5 +468,5 @@ object LoggingMarkers {
LogMarkerToken(database, "deleteDocumentAttachment", start)(MeasurementUnit.time.milliseconds)
val DATABASE_ATTS_DELETE =
LogMarkerToken(database, "deleteDocumentAttachments", start)(MeasurementUnit.time.milliseconds)
- val DATABASE_BATCH_SIZE = LogMarkerToken(database, "batchSize", count)(MeasurementUnit.none)
+ val DATABASE_BATCH_SIZE = LogMarkerToken(database, "batchSize", counter)(MeasurementUnit.none)
}
diff --git a/common/scala/src/main/scala/org/apache/openwhisk/http/BasicHttpService.scala b/common/scala/src/main/scala/org/apache/openwhisk/http/BasicHttpService.scala
index 3e71fc8..e734d7a 100644
--- a/common/scala/src/main/scala/org/apache/openwhisk/http/BasicHttpService.scala
+++ b/common/scala/src/main/scala/org/apache/openwhisk/http/BasicHttpService.scala
@@ -144,7 +144,7 @@ trait BasicHttpService extends Directives {
LogMarkerToken(
"http",
m.toLowerCase,
- LoggingMarkers.count,
+ LoggingMarkers.counter,
Some(res.status.intValue.toString),
Map("statusCode" -> res.status.intValue.toString))(MeasurementUnit.time.milliseconds)
val marker = LogMarker(token, tid.deltaToStart, Some(tid.deltaToStart))
diff --git a/docs/metrics.md b/docs/metrics.md
index b4538e8..c19108e 100644
--- a/docs/metrics.md
+++ b/docs/metrics.md
@@ -110,7 +110,7 @@ Metrics below are emitted from within a Controller instance.
##### Controller Startup
-* `openwhisk.counter.controller_startup<controller_id>_count` (counter)
+* `openwhisk.counter.controller_startup<controller_id>_counter` (counter)
* Example _openwhisk.counter.controller_startup0_count_
* Records count of controller instance startup
@@ -138,7 +138,7 @@ Aggregate metrics for inflight activations.
Metrics below are for current memory capacity
-* `openwhisk.histogram.loadbalancer_totalCapacity<invokerType>_count` (histogram) - Current memory capacity for all usable managed and blackbox invokers, total user memory in shard managed by controller. **invokerType** defines whether it is a managed or a blackbox invoker.
+* `openwhisk.histogram.loadbalancer_totalCapacity<invokerType>_counter` (histogram) - Current memory capacity for all usable managed and blackbox invokers, total user memory in shard managed by controller. **invokerType** defines whether it is a managed or a blackbox invoker.
Metrics below are captured within load balancer
@@ -152,10 +152,10 @@ Metrics below are captured within load balancer
Metrics below are for invoker state as recorded within load balancer monitoring.
-* `openwhisk.gauge.loadbalancer_totalHealthyInvoker<invokerType>_count`(gauge) - Records the count of managed invokers considered healthy based on health pings. **invokerType** defines whether it is a managed or a blackbox invoker.
-* `openwhisk.gauge.loadbalancer_totalUnresponsiveInvoker<invokerType>_count` (gauge) - Records the count of managed invokers considered unresponsive when health pings arriving fine but the invokers do not respond with active-acks in given time. **invokerType** defines whether it is a managed or a blackbox invoker.
-* `openwhisk.gauge.loadbalancer_totalOfflineInvoker<invokerType>_count` (gauge) - Records the count of managed invokers considered offline when no health pings arrive from the invokers. **invokerType** defines whether it is a managed or a blackbox invoker.
-* `openwhisk.gauge.loadbalancer_totalUnhealthyInvoker<invokerType>_count` (gauge) - Records the count of managed invokers considered unhealthy when health pings arrive fine but the invokers report system errors. **invokerType** defines whether it is a managed or a blackbox invoker.
+* `openwhisk.gauge.loadbalancer_totalHealthyInvoker<invokerType>_counter`(gauge) - Records the count of managed invokers considered healthy based on health pings. **invokerType** defines whether it is a managed or a blackbox invoker.
+* `openwhisk.gauge.loadbalancer_totalUnresponsiveInvoker<invokerType>_counter` (gauge) - Records the count of managed invokers considered unresponsive when health pings arriving fine but the invokers do not respond with active-acks in given time. **invokerType** defines whether it is a managed or a blackbox invoker.
+* `openwhisk.gauge.loadbalancer_totalOfflineInvoker<invokerType>_counter` (gauge) - Records the count of managed invokers considered offline when no health pings arrive from the invokers. **invokerType** defines whether it is a managed or a blackbox invoker.
+* `openwhisk.gauge.loadbalancer_totalUnhealthyInvoker<invokerType>_counter` (gauge) - Records the count of managed invokers considered unhealthy when health pings arrive fine but the invokers report system errors. **invokerType** defines whether it is a managed or a blackbox invoker.
#### Invoker metrics
@@ -234,7 +234,7 @@ Following metrics capture stats around various docker command executions.
Metrics below are emitted per kafka topic.
* `openwhisk.histogram.kafka_<topic name>.delay_start` - Time delay between when a message was pushed to Kafka and when it is read within a consumer. This metric is recorded for every message read.
-* `openwhisk.gauge.kafka_<topic name>_count` - Records the Queue size of the topic. By default this metric is emitted every 60 secs.
+* `openwhisk.gauge.kafka_<topic name>_counter` - Records the Queue size of the topic. By default this metric is emitted every 60 secs.
Metrics per topic
* `cacheInvalidation` - Emitted per controller while reading the cache invalidation messages.