Skip to content

Commit 37ca229

Browse files
committed
Adding metrics handler mounted at path ?_metrics
1 parent 110b0a0 commit 37ca229

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

example/common/src/main/java/org/microbule/example/common/HelloResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public interface HelloResource {
4242
@Path("/{name}")
4343
@Produces(MediaType.APPLICATION_JSON)
4444
@GET
45-
@Timed
45+
@Timed(strategy = "timeWindow")
4646
@Cacheable
4747
@ApiOperation(value = "Say Hello", notes = "Returns a greeting", response = HelloResponse.class)
48-
HelloResponse sayHello(@ApiParam(value="name", required = true) @PathParam("name") @Size(min = 5, message = "Name must be at least 5 characters long.") String name);
48+
HelloResponse sayHello(@ApiParam(value = "name", required = true) @PathParam("name") @Size(min = 5, message = "Name must be at least 5 characters long.") String name);
4949
}

metrics/decorator/src/main/resources/OSGI-INF/blueprint/microbule-metrics-decorator.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
2121

22-
<service id="metricsService" interface="org.microbule.metrics.api.MetricsService"/>
22+
<reference id="metricsService" interface="org.microbule.metrics.api.MetricsService"/>
2323

2424
<bean id="decorator" class="org.microbule.metrics.decorator.MetricsDecorator">
2525
<argument ref="metricsService"/>

0 commit comments

Comments
 (0)