-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
598 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
*.class | ||
*.log | ||
.history | ||
*.sc | ||
.pygments-cache | ||
.DS_Store | ||
|
||
# sbt specific | ||
dist/* | ||
target/ | ||
lib_managed/ | ||
src_managed/ | ||
project/boot/ | ||
project/plugins/project/ | ||
.ensime | ||
.ensime_cache | ||
|
||
# Scala-IDE specific | ||
.scala_dependencies | ||
.idea | ||
.idea_modules | ||
|
||
# Intellij | ||
.idea/ | ||
*.iml | ||
*.iws | ||
|
||
# Eclipse | ||
.project | ||
.settings | ||
.classpath | ||
.cache | ||
.cache-main | ||
.cache-tests | ||
bin/ | ||
|
||
_site | ||
|
||
# Ignore Play! working directory # | ||
db | ||
eclipse | ||
lib | ||
log | ||
logs | ||
modules | ||
precompiled | ||
project/project | ||
project/target | ||
target | ||
tmp | ||
test-result | ||
server.pid | ||
*.iml | ||
*.eml | ||
|
||
# Default sigar library provision location. | ||
native/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
language: scala | ||
script: | ||
- sbt ++$TRAVIS_SCALA_VERSION compile publish-local | ||
scala: | ||
- 2.11.8 | ||
jdk: | ||
- oraclejdk8 | ||
before_script: | ||
- mkdir $TRAVIS_BUILD_DIR/tmp | ||
- export SBT_OPTS="-Djava.io.tmpdir=$TRAVIS_BUILD_DIR/tmp" | ||
sudo: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Contributing to Kamon | ||
===================== | ||
|
||
Thanks for your intention on collaborating to the Kamon Project! It doesn't matter if you want to provide a small change | ||
to our docs, are lost in configuration or want contribute a brand new feature, we value all of your contributions and | ||
the time you take to use our tool and prepare a contribution, we only ask you to follow this guidance depending on your | ||
situation: | ||
|
||
If you are experiencing a bug | ||
----------------------------- | ||
|
||
If you see weird exceptions in your log or something definitely is working improperly please [open an issue] and include | ||
the Kamon, Akka and Spray/Play! versions that you are using along with as many useful information you can find related | ||
to the issue. If you can provide a gist or a short way to reproduce the issue we will be more than happy! | ||
|
||
If you don't know what is wrong | ||
------------------------------- | ||
|
||
If you don't see any metrics at all or features are not working maybe you have a setup or configuration problem, to | ||
address this kind of problems please send us a emails to our [mailing list] and we will reply as soon as we can! Again, | ||
please include the relevant version and current setup information to speed up the process. If you are in doubt of | ||
whether you have a bug or a configuration problem, email us and we will take care of openning a issue if necessary. | ||
|
||
If you want to make a code contribution to the project | ||
------------------------------------------------------ | ||
|
||
Awesome! First, please note that we try to follow the [commit message conventions] used by the Spray guys and we need | ||
you to electronically fill our [CLA] before accepting your contribution. Also, if your PR contains various commits, | ||
please squash them into a single commit. Let the PR rain begin! | ||
|
||
|
||
[open an issue]: https://github.com/kamon-io/Kamon/issues/new | ||
[mailing list]: https://groups.google.com/forum/#!forum/kamon-user | ||
[commit message conventions]: http://spray.io/project-info/contributing/ | ||
[CLA]: https://docs.google.com/forms/d/1G_IDrBTFzOMwHvhxfKRBwNtpRelSa_MZ6jecH8lpTlc/viewform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
This software is licensed under the Apache 2 license, quoted below. | ||
|
||
Copyright © 2013-2014 the kamon project <http://kamon.io> | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
use this file except in compliance with the License. You may obtain a copy of | ||
the License at | ||
|
||
[http://www.apache.org/licenses/LICENSE-2.0] | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
License for the specific language governing permissions and limitations under | ||
the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
Log Reporter ![Build Status](https://api.travis-ci.org/kamon-io/kamon-system-metrics)](https://travis-ci.org/kamon-io/kamon-scala/builds) | ||
========================== | ||
|
||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kamon-io/Kamon?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
|
||
***kamon-log-reporter*** [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.kamon/kamon-log-reporter_2.11/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.kamon/kamon-log-reporter.11) | ||
|
||
Using the LogReporter | ||
===================== | ||
|
||
The `kamon-log-reporter` module is a very simple metrics reporter that subscribes to certain supported categories and | ||
dumps the available data in table-like format on every tick. | ||
|
||
This module is not meant to be used in <b>production environments</b>, but it certainly is a convenient way to test Kamon without having to install a full-fledged metrics backend for development purposes. | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
Add the `kamon-log-reporter` dependency to your project and ensure that it is in your classpath at runtime, that's it. | ||
Kamon's module loader will detect that the log reporter is in the classpath and automatically start it. | ||
|
||
|
||
Reported Metrics | ||
---------------- | ||
|
||
This reporter will automatically subscribe itself to the following categories: | ||
|
||
* __counter, histogram, min-max-counter and gauge__: All single-instrument entities are reported. | ||
* __trace__: Displaying several percentiles for the `elapsed-time` metric. | ||
* __akka-actor__: Displaying several percentiles for the `processing-time` and `time-in-mailbox` metrics, as well as | ||
the number of `errors` and the `mailbox-size` bounds. | ||
* __akka-dispatcher__: Displaying summary metrics for both `fork-join-pool` and `thread-pool-executor` dispatchers. | ||
* __system-metric__: Only the `cpu`, `process-cpu`, `network` and `context-switches` metrics are logged with this reporter. | ||
|
||
All entities but single-instrument entities are logged using separate log statements. Single-instrument entities are all | ||
grouped and logged together. Here is a log example that can give you an idea of what to expect when using the log reporter: | ||
|
||
``` | ||
[INFO] [05/09/2015 01:54:42.699] [kamon-akka.actor.default-dispatcher-6] [akka://kamon/user/kamon-log-reporter] | ||
+--------------------------------------------------------------------------------------------------+ | ||
| | | ||
| Trace: RespondWithOK-3 | | ||
| Count: 0 | | ||
| | | ||
| Elapsed Time (nanoseconds): | | ||
| Min: 0 50th Perc: 0 90th Perc: 0 95th Perc: 0 | | ||
| 99th Perc: 0 99.9th Perc: 0 Max: 0 | | ||
| | | ||
+--------------------------------------------------------------------------------------------------+ | ||
[INFO] [05/09/2015 01:54:42.699] [kamon-akka.actor.default-dispatcher-6] [akka://kamon/user/kamon-log-reporter] | ||
+--------------------------------------------------------------------------------------------------+ | ||
| | | ||
| Actor: test/user/simple-service-actor | | ||
| | | ||
| Processing Time (nanoseconds) Time in Mailbox (nanoseconds) Mailbox Size | | ||
| Msg Count: 1506 Msg Count: 1506 Min: 0 | | ||
| Min: 153 Min: 496 Avg.: 0.0 | | ||
| 50th Perc: 3280 50th Perc: 51456 Max: 15 | | ||
| 90th Perc: 99840 90th Perc: 440320 | | ||
| 95th Perc: 141312 95th Perc: 1433600 | | ||
| 99th Perc: 667648 99th Perc: 5963776 Error Count: 0 | | ||
| 99.9th Perc: 3211264 99.9th Perc: 7012352 | | ||
| Max: 6127616 Max: 7045120 | | ||
| | | ||
+--------------------------------------------------------------------------------------------------+ | ||
[INFO] [05/09/2015 01:54:42.699] [kamon-akka.actor.default-dispatcher-6] [akka://kamon/user/kamon-log-reporter] | ||
+--------------------------------------------------------------------------------------------------+ | ||
| | | ||
| Actor: kamon/user/kamon-log-reporter | | ||
| | | ||
| Processing Time (nanoseconds) Time in Mailbox (nanoseconds) Mailbox Size | | ||
| Msg Count: 1 Msg Count: 1 Min: 0 | | ||
| Min: 1417216 Min: 11200 Avg.: 0.0 | | ||
| 50th Perc: 1417216 50th Perc: 11200 Max: 1 | | ||
| 90th Perc: 1417216 90th Perc: 11200 | | ||
| 95th Perc: 1417216 95th Perc: 11200 | | ||
| 99th Perc: 1417216 99th Perc: 11200 Error Count: 0 | | ||
| 99.9th Perc: 1417216 99.9th Perc: 11200 | | ||
| Max: 1417216 Max: 11200 | | ||
| | | ||
+--------------------------------------------------------------------------------------------------+ | ||
[INFO] [05/09/2015 01:54:42.700] [kamon-akka.actor.default-dispatcher-6] [akka://kamon/user/kamon-log-reporter] | ||
+--------------------------------------------------------------------------------------------------+ | ||
| Thread-Pool-Executor | | ||
| | | ||
| Dispatcher: test/akka.io.pinned-dispatcher | | ||
| | | ||
| Core Pool Size: 1 | | ||
| Max Pool Size: 1 | | ||
| | | ||
| | | ||
| Pool Size Active Threads Processed Task | | ||
| Min 1 1 0 | | ||
| Avg 1.0 1.0 0.0 | | ||
| Max 1 1 0 | | ||
| | | ||
+--------------------------------------------------------------------------------------------------+ | ||
[INFO] [05/09/2015 01:54:42.700] [kamon-akka.actor.default-dispatcher-6] [akka://kamon/user/kamon-log-reporter] | ||
+--------------------------------------------------------------------------------------------------+ | ||
| Fork-Join-Pool | | ||
| | | ||
| Dispatcher: test/akka.actor.default-dispatcher | | ||
| | | ||
| Paralellism: 24 | | ||
| | | ||
| Pool Size Active Threads Running Threads Queue Task Count | | ||
| Min 18 0 0 0 | | ||
| Avg 20.0 0.0 0.0 0.0 | | ||
| Max 24 24 8 4 | | ||
| | | ||
+--------------------------------------------------------------------------------------------------+ | ||
[INFO] [05/09/2015 01:54:42.701] [kamon-akka.actor.default-dispatcher-6] [akka://kamon/user/kamon-log-reporter] | ||
+--------------------------------------------------------------------------------------------------+ | ||
| Fork-Join-Pool | | ||
| | | ||
| Dispatcher: kamon/akka.actor.default-dispatcher | | ||
| | | ||
| Paralellism: 10 | | ||
| | | ||
| Pool Size Active Threads Running Threads Queue Task Count | | ||
| Min 10 5 2 0 | | ||
| Avg 10.0 8.0 3.0 0.0 | | ||
| Max 10 10 7 0 | | ||
| | | ||
+--------------------------------------------------------------------------------------------------+ | ||
[INFO] [05/09/2015 01:54:42.702] [kamon-akka.actor.default-dispatcher-6] [akka://kamon/user/kamon-log-reporter] | ||
+--------------------------------------------------------------------------------------------------+ | ||
| | | ||
| Trace: OKFuture | | ||
| Count: 500 | | ||
| | | ||
| Elapsed Time (nanoseconds): | | ||
| Min: 268288 50th Perc: 577536 90th Perc: 1884160 95th Perc: 3751936 | | ||
| 99th Perc: 7143424 99.9th Perc: 26738688 Max: 26738688 | | ||
| | | ||
+--------------------------------------------------------------------------------------------------+ | ||
[INFO] [05/09/2015 01:54:42.702] [kamon-akka.actor.default-dispatcher-6] [akka://kamon/user/kamon-log-reporter] | ||
+--------------------------------------------------------------------------------------------------+ | ||
| | | ||
| Counters | | ||
| ------------- | | ||
| requests => 500 | | ||
| | | ||
| | | ||
| Histograms | | ||
| -------------- | | ||
| | | ||
| MinMaxCounters | | ||
| ----------------- | | ||
| | | ||
| Gauges | | ||
| ---------- | | ||
| | | ||
+--------------------------------------------------------------------------------------------------+ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* ========================================================================================= | ||
* Copyright © 2013-2016 the kamon project <http://kamon.io/> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file | ||
* except in compliance with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the | ||
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the specific language governing permissions | ||
* and limitations under the License. | ||
* ========================================================================================= | ||
*/ | ||
|
||
|
||
import Settings._ | ||
import Dependencies._ | ||
|
||
lazy val root = (project in file(".")) | ||
.settings(name := "kamon-system-metrics") | ||
.settings(basicSettings: _*) | ||
.settings(formatSettings: _*) | ||
.settings( | ||
libraryDependencies ++= | ||
compileScope(kamonCore) ++ | ||
testScope(scalatest, akkaTestKit, slf4jApi, logback)) |
Oops, something went wrong.