From 22a562436a466eb4b8d225d3a841237d10ed2ebd Mon Sep 17 00:00:00 2001 From: Ryan Tenney Date: Fri, 14 Jun 2013 18:08:54 -0300 Subject: [PATCH] Update README.md --- README.md | 51 ++++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 25e9916d..68d4b498 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ #Metrics for Spring [![Build Status](https://secure.travis-ci.org/ryantenney/metrics-spring.png)](http://travis-ci.org/ryantenney/metrics-spring) -================================= ##About @@ -11,32 +10,17 @@ This module does the following things: * Registers a `Gauge` for beans which have members annotated with `@Gauge` * Autowires Timers, Meters, Counters and Histograms into fields annotated with `@InjectMetric` * Registers with the `HealthCheckRegistry` any beans which extend the class `HealthCheck` +* Creates reporters and binds them to the Spring lifecycle ###Maven -Current release version is 2.1.4, which works with Metrics 2.x. +Current version is 3.0.0-RC1, which is compatible with Metrics 3.0 ```xml com.ryantenney.metrics metrics-spring - 2.1.4 - -``` - -Currently working on 3.0.0-SNAPSHOT for Metrics 3 compatibility. - -```xml - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - http://oss.sonatype.org/content/repositories/snapshots - - - - com.ryantenney.metrics - metrics-spring - 3.0.0-SNAPSHOT + 3.0.0-RC1 ``` @@ -58,14 +42,16 @@ Spring Context XML: http://www.ryantenney.com/schema/metrics http://www.ryantenney.com/schema/metrics/metrics-3.0.xsd"> - + + + ``` -Java Config (available in 3.0.0-SNAPSHOT): +Java Annotation Config: ```java import org.springframework.context.annotation.Configuration; @@ -87,7 +73,26 @@ The `` element is required, and has 4 optional argu * `proxy-target-class` - if set to true, always creates CGLIB proxies instead of defaulting to JDK proxies. This *may* be necessary if you use class-based autowiring. * `expose-proxy` - if set to true, the target can access the proxy which wraps it by calling `AopContext.currentProxy()`. -The element `` currently doesn't do a damn thing, but it will soon! +The `` element constructs a new MetricRegistry or retrieves a shared registry: + +* `id` - the bean name with which to register the MetricRegistry bean +* `name` - the name of the MetricRegistry, if present, this calls SharedMetricRegistries.getOrCreate(name) + +The `` element constructs a new HealthCheckRegistry: + +* `id` - the bean name with which to register the HealthCheckRegistry bean + +The `` element creates and starts a reporter. + +* `id` - +* `metric-registry` - the id of the `MetricRegsitry` bean for which the reporter should retrieve metrics +* `type` - the type of the reporter. Additional types may be registered through SPI (more on this later). + * `console`: ConsoleReporter + * `jmx`: JmxReporter + * `slf4j`: Slf4jReporter + * `ganglia`: GangliaReporter (requires metrics-ganglia) + * `graphite`: GraphiteReporter (requires metrics-graphite) + ###A Note on the Limitations of Spring AOP @@ -116,7 +121,7 @@ Additionally, `@InjectMetric` may be used on non-public, non-final fields. ### License -Copyright (c) 2012 Ryan Tenney, Martello Technologies +Copyright (c) 2012-2013 Ryan Tenney, Martello Technologies Published under Apache Software License 2.0, see LICENSE