diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-04-24 13:54:40 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-04-24 13:54:40 +0200 |
commit | 4d828e1a3195e55365c865aa3a78af9668742643 (patch) | |
tree | 07fff2683933c96297a8ba577bbdc89888da16e1 /kamon-examples/kamon-fluentd-example/src | |
parent | 469c11dc1ddb140f407a33f48033e533bf60611c (diff) | |
download | Kamon-4d828e1a3195e55365c865aa3a78af9668742643.tar.gz Kamon-4d828e1a3195e55365c865aa3a78af9668742643.tar.bz2 Kamon-4d828e1a3195e55365c865aa3a78af9668742643.zip |
Prepare for the major cleanup
Moved all the original files from src/main to src/legacy-main, same with test files. Also
removed the autoweave module, examples and bench as I'm planning to have them in separate
repositories.
Diffstat (limited to 'kamon-examples/kamon-fluentd-example/src')
-rw-r--r-- | kamon-examples/kamon-fluentd-example/src/main/resources/application.conf | 73 | ||||
-rw-r--r-- | kamon-examples/kamon-fluentd-example/src/main/scala/KamonFluentdExample.scala | 60 |
2 files changed, 0 insertions, 133 deletions
diff --git a/kamon-examples/kamon-fluentd-example/src/main/resources/application.conf b/kamon-examples/kamon-fluentd-example/src/main/resources/application.conf deleted file mode 100644 index bb69abd3..00000000 --- a/kamon-examples/kamon-fluentd-example/src/main/resources/application.conf +++ /dev/null @@ -1,73 +0,0 @@ -# ===================================== # -# Kamon-Fluentd Reference Configuration # -# ===================================== # - -kamon { - metric.filters { - akka-actor { - includes = ["**"], - } - - akka-dispatcher { - includes = ["**"] - } - - akka-router { - includes = ["**"] - } - } - - fluentd { - # Hostname and port of fluentd server to which kamon fluentd sends metrics. - hostname = "localhost" - port = 24224 - - # tag prefix of metrics data which is sent to fluentd server - tag = "kamon.fluentd" - - # Interval between metrics data flushes to fluentd server. - # It's value must be equal or greater than the kamon.metric.tick-interval setting. - flush-interval = 10 seconds - - # Your app name - application-name = "kamon-fluentd-example" - - # Subscription patterns used to select which metrics will be pushed to Fluentd. Note that first, metrics - # collection for your desired entities must be activated under the kamon.metrics.filters settings. - subscriptions { - histogram = [ "**" ] - min-max-counter = [ "**" ] - gauge = [ "**" ] - counter = [ "**" ] - trace = [ "**" ] - trace-segment = [ "**" ] - akka-actor = [ "**" ] - akka-dispatcher = [ "**" ] - akka-router = [ "**" ] - system-metric = [ "**" ] - http-server = [ "**" ] - } - - # statistic values to be reported for histogram type metrics - # (i.e. Histogram, MinMaxCounter, Gauge). - histogram-stats { - # stats values: - # "count", "min", "max", "average", "percentiles" are supported. - # you can use "*" for wildcards. - subscription = [ "count", "min", "max", "average", "percentiles" ], - - # percentile points: - # this will be used when you set "percentiles" in "subscription" above. - # In this example, kamon-fluentd reports 50th 90th, 99th and 99.9th percentiles. - percentiles = [50.0, 90.0, 99.0, 99.9] - } - } - - modules { - kamon-fluentd { - auto-start = yes - requires-aspectj = no - extension-class = "kamon.fluentd.Fluentd" - } - } -}
\ No newline at end of file diff --git a/kamon-examples/kamon-fluentd-example/src/main/scala/KamonFluentdExample.scala b/kamon-examples/kamon-fluentd-example/src/main/scala/KamonFluentdExample.scala deleted file mode 100644 index bb1d0f7b..00000000 --- a/kamon-examples/kamon-fluentd-example/src/main/scala/KamonFluentdExample.scala +++ /dev/null @@ -1,60 +0,0 @@ -/* ========================================================================================= - * Copyright © 2013-2015 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 akka.actor.ActorSystem -import kamon.Kamon -import spray.routing.SimpleRoutingApp -import xerial.fluentd.{ FluentdConfig, FluentdStandalone } - -import scala.util.Properties - -object KamonFluentdExample extends App with SimpleRoutingApp { - // Start fluentd server only for this sample app - // In real usecase, you will spawn fluentd server independently. - val fluentdServer = FluentdStandalone.start(FluentdConfig(configuration = - """ - |<source> - | type forward - | port 24224 - |</source> - |<match **> - | type file - | path target/fluentd-out - |</match> - """.stripMargin)) - sys.addShutdownHook { - fluentdServer.stop - } - - // start Kamon - Kamon.start() - - implicit val system = ActorSystem("kamon-fluentd-example") - - // server endpoint - val interface = "0.0.0.0" - val port = Properties.envOrElse("PORT", "8080").toInt - - // resource endpoints - startServer(interface = interface, port = port) { - path("hello") { - get { - complete { - <h1>Hello! Kamon Fluentd Example!</h1> - } - } - } - } -} |