aboutsummaryrefslogtreecommitdiff
path: root/site/src/jekyll/newrelic/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'site/src/jekyll/newrelic/index.md')
-rw-r--r--site/src/jekyll/newrelic/index.md80
1 files changed, 33 insertions, 47 deletions
diff --git a/site/src/jekyll/newrelic/index.md b/site/src/jekyll/newrelic/index.md
index 6200586b..3ce6d29d 100644
--- a/site/src/jekyll/newrelic/index.md
+++ b/site/src/jekyll/newrelic/index.md
@@ -7,38 +7,7 @@ NewRelic Module
===
A simple module to report some application metrics like External Services, Errors and Apdex.
-## Usage
-
-### SBT settings
-
-Add the following sbt dependencies to your project settings:
-
-```scala
-libraryDependencies += "org.kamon" % "kamon-newrelic" % "0.1.0"
-libraryDependencies += "com.newrelic.agent.java" % "newrelic-api" % "3.1.0"
-```
-### Configuration
-
-```scala
--javaagent:/path-to-newrelic-agent.jar, -Dnewrelic.environment=production, -Dnewrelic.config.file=/path-to-newrelic.yml
-```
-
-### Screenshot
-
-![newrelic](/assets/img/newrelicdifu2.png "Screenshot NewRelic")
-
-
-## Limitations
-* The first implementation only supports a subset of NewRelic metrics
-
-## Licensing
-
-NewRelic has [its own, separate licensing](http://newrelic.com/terms).
-
-
-Documentation
-===
-
+---
Dependencies
---
@@ -59,18 +28,17 @@ Configuration
Just like other products in the scala ecosystem, it relies on the typesafe configuration library. If you are a new relic user, you will requiere to add a logger to the application.conf file
-Since kamon uses the same configuration technique as [Spray](http://spray.io/documentation "Spray") / [Akka](http://akka.io/docs "Akka") you might want to check out the [Akka-Documentation-configuration](http://doc.akka.io/docs/akka/2.1.4/general/configuration.html "Akka Documentation on configuration")
-.
+Since kamon uses the same configuration technique as [Spray](http://spray.io/documentation "Spray") / [Akka](http://akka.io/docs "Akka") you might want to check out the [Akka-Documentation-configuration](http://doc.akka.io/docs/akka/2.1.4/general/configuration.html "Akka Documentation on configuration").
In order to see Kamon in action you need first to set up your sbt project. Add the following sbt dependencies to your project settings:
-1. Add Kamon repository to resolvers
+1) Add Kamon repository to resolvers
```scala
-"Kamon Repository" at "http://repo.kamon.io"
+ "Kamon Repository" at "http://repo.kamon.io"
```
-2. Add libraryDepenency
+2) Add libraryDepenency
```scala
"kamon" %% "kamon-spray" % "0.0.11",
@@ -87,11 +55,10 @@ In addition we suggest to create aspectj.sbt file and add this content
javaOptions <++= AspectjKeys.weaverOptions in Aspectj
```
-3. Add to your plugins.sbt in project folder (if you don't have one yet, create the file) and add the Kamon release to the resolver and the aspecj. You need to add the sbt-newrelic plugin
+3) Add to your plugins.sbt in project folder (if you don't have one yet, create the file) and add the Kamon release to the resolver and the aspecj. You need to add the sbt-newrelic plugin
```scala
- resolvers += Resolver.url("Kamon Releases",
- url("http://repo.kamon.io"))(Resolver.ivyStylePatterns)
+ resolvers += Resolver.url("Kamon Releases", url("http://repo.kamon.io"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.ivantopo.sbt" %% "sbt-newrelic" % "0.0.1")
@@ -103,16 +70,22 @@ In addittion, you have to provide the new relic agent and configure a logger in
```scala
akka {
- loggers = ["akka.event.slf4j.Slf4jLogger","kamon.newrelic.NewRelicErrorLogger"]
+ loggers = ["akka.event.slf4j.Slf4jLogger","kamon.newrelic.NewRelicErrorLogger"]
- extensions = ["kamon.newrelic.NewRelic"]
- actor {
- debug {
- unhandled = on
- }
+ extensions = ["kamon.newrelic.NewRelic"]
+ actor {
+ debug {
+ unhandled = on
+ }
}
- }
+ }
```
+Optionally you can add the newrelic agent in the command line
+
+```scala
+-javaagent:/path-to-newrelic-agent.jar, -Dnewrelic.environment=production, -Dnewrelic.config.file=/path-to-newrelic.yml
+```
+
Examples
---
@@ -136,3 +109,16 @@ In order to see how it works, you need to send a message to the rest service
```bash
curl -v --header 'X-UOW:YOUR_TRACER_ID' -X GET 'http://0.0.0.0:6666/fibonacci'
```
+
+### Screenshot
+
+![newrelic](/assets/img/newrelicdifu2.png "Screenshot NewRelic")
+
+
+## Limitations
+* The first implementation only supports a subset of NewRelic metrics
+
+## Licensing
+
+NewRelic has [its own, separate licensing](http://newrelic.com/terms).
+