From 34f38dc1cc22b20f007f19a28f8c42c26e034a69 Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Wed, 5 Mar 2014 08:04:57 -0300 Subject: basic traces documentation --- site/src/jekyll/newrelic/index.md | 117 -------------------------------------- 1 file changed, 117 deletions(-) delete mode 100644 site/src/jekyll/newrelic/index.md (limited to 'site/src/jekyll/newrelic/index.md') diff --git a/site/src/jekyll/newrelic/index.md b/site/src/jekyll/newrelic/index.md deleted file mode 100644 index 38a87245..00000000 --- a/site/src/jekyll/newrelic/index.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: kamon | NewRelic Module | Documentation -layout: default ---- - -NewRelic Module -=============== - -If you are a Newrelic user and tried to start start your app using the Newrelic agent you probably noticed a crude reality: -nothing is shown in your dashboard, no web transactions are recognized and errors are not reported for your Spray applications. -Don't even think about detailed traces for the slowest transactions. - -We love Spray, and we love Newrelic, we couldn't leave this happening anymore! - -Currently the Newrelic Module works together with the Spray Module to get information about your Web Transactions and send -that information to Newrelic servers as a aggregate to the data already colected by Newrelic's Agent. Currently the data -being reported is: - -- Time spent for Web Transactions: Also known as `HttpDispatcher` time, represents the total time taken to process a web -transaction, from the moment the `HttpRequest` is received by spray-can, to the moment the answer is sent to the IO layer. -- Apdex -- Errors - -Differentiation between JVM and External Services is coming soon, as well as actor metrics and detailed traces. - - - -Installation -------------- - -To use the Newrelic module just make sure you put the `kamon-newrelic` and `kamon-spray` libraries in your classpath and -start your application with both, the Aspectj Weaver and Newrelic agents. Please refer to our [get started](/get-started) page -for more info on how to add the AspectJ Weaver and the [Newrelic Agent Installations Instructions](https://docs.newrelic.com/docs/java/new-relic-for-java#h2-installation). - - -Configuration -------------- - -Currently you will need to add a few settings to your `application.conf` file for the module to work: - -```scala -akka { - // Custom logger for NewRelic that takes all the `Error` events from the event stream and publish them to NewRelic - loggers = ["akka.event.slf4j.Slf4jLogger", "kamon.newrelic.NewRelicErrorLogger"] - // Make sure the NewRelic extension is loaded with the ActorSystem - extensions = ["kamon.newrelic.NewRelic"] -} - -kamon { - newrelic { - // These values must match the values present in your newrelic.yml file. - app-name = "KamonNewRelicExample[Development]" - license-key = 0123456789012345678901234567890123456789 - } -} -``` - - -Let's see it in Action! ------------------------ - -Let's create a very simple Spray application to show what you should expect from this module. The entire application code -is at [Github](https://github.com/kamon-io/Kamon/tree/master/kamon-examples/kamon-newrelic-example). - -```scala -import akka.actor.ActorSystem -import spray.routing.SimpleRoutingApp - -object NewRelicExample extends App with SimpleRoutingApp { - - implicit val system = ActorSystem("kamon-system") - - startServer(interface = "localhost", port = 8080) { - path("helloKamon") { - get { - complete { -

Say hello to Kamon

- } - } - } ~ - path("helloNewRelic") { - get { - complete { -

Say hello to NewRelic

- } - } - } - } -} -``` - -As you can see, this is a dead simple application: two paths, different responses for each of them. Now let's hit it hard -with Apache Bench: - -```bash -ab -k -n 200000 http://localhost:8080/helloKamon -ab -k -n 200000 http://localhost:8080/helloNewRelic -``` - -After a couple minutes running you should start seeing something similar to this in your dashboard: - -![newrelic](/assets/img/newrelic.png "NewRelic Screenshot") - -
-Note: Don't think that those numbers are wrong, Spray is that fast! -
- - -Limitations ------------ -* The first implementation only supports a subset of NewRelic metrics - - -Licensing ---------- -NewRelic has [its own, separate licensing](http://newrelic.com/terms). - -- cgit v1.2.3