File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
scala/org/apache/openwhisk/common Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,13 @@ dependencies {
6464 compile ' com.github.ben-manes.caffeine:caffeine:2.6.2'
6565 compile ' com.google.code.findbugs:jsr305:3.0.2'
6666 compile ' io.fabric8:kubernetes-client:4.0.3'
67- compile ' io.kamon:kamon-core_2.12:1.1.3'
67+ compile (' io.kamon:kamon-core_2.12:1.1.3' ) {
68+ exclude group : ' com.lihaoyi'
69+ }
6870 compile ' io.kamon:kamon-statsd_2.12:1.0.0'
71+ compile (' io.kamon:kamon-system-metrics_2.12:1.0.0' ) {
72+ exclude group : ' io.kamon' , module : ' sigar-loader'
73+ }
6974 // for mesos
7075 compile ' com.adobe.api.platform.runtime:mesos-actor:0.0.17'
7176
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ kamon {
4646
4747 metric-key-generator = org.apache.openwhisk.common.WhiskStatsDMetricKeyGenerator
4848 }
49+ system-metrics {
50+ # disable the host metrics as we are only interested in JVM metrics
51+ host.enabled = false
52+ }
4953
5054 reporters = [
5155 "kamon.statsd.StatsDReporter"
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import akka.event.LoggingAdapter
2626import kamon .Kamon
2727import kamon .metric .{Counter => KCounter , Histogram => KHistogram }
2828import kamon .statsd .{MetricKeyGenerator , SimpleMetricKeyGenerator }
29+ import kamon .system .SystemMetrics
2930import org .apache .openwhisk .core .entity .ControllerInstanceId
3031
3132trait Logging {
@@ -274,6 +275,10 @@ object LogMarkerToken {
274275}
275276
276277object MetricEmitter {
278+ if (TransactionId .metricsKamon) {
279+ SystemMetrics .startCollecting()
280+ }
281+
277282 def emitCounterMetric (token : LogMarkerToken , times : Long = 1 ): Unit = {
278283 if (TransactionId .metricsKamon) {
279284 token.counter.increment(times)
You can’t perform that action at this time.
0 commit comments