-
Notifications
You must be signed in to change notification settings - Fork 297
Publishing to Graphite
In this configuration, Servo fulfills a feature set similar to StatsD.
Follow the steps outlined on the Graphite Installation page.
Creating an observer you just to select the prefix and specify the address for the graphite server:
String prefix = "servo";
String addr = "localhost:2003";
MetricObserver observer = new GraphiteMetricObserver(prefix, addr);
All metrics reported will have the same prefix as the first part of the name. See the Graphite naming scheme documentation for more information. The default naming convention is just to use the prefix and the metric name, all other tags will be ignored. You can customize the names by implementing the naming convention interface and passing it to the observer.
There is an example app that runs a basic web server and records a few metrics about requests. To run the example:
$ ./gradlew servo-example:run
By default it will log metrics to local files in the /tmp directory. You can configure it to send to graphite by setting the system properties:
servo.example.isGraphiteObserverEnabled=true
servo.example.graphiteObserverAddress=<your_server_name>:<port>
A Netflix Original Production
Netflix OSS | Tech Blog | Twitter @NetflixOSS | Jobs
- Getting Started
- Sample Code
- CloudWatch Sample Code
- Docs
- Contributing
- End-to-End Examples