title: Unable to see metrics captured with spring metrics annotations
body: <p>How can I do the equivalent of:</p>
  
  <pre><code>  @Override
    public void init(final ServletConfig config) throws ServletException {
      super.init(config);
      CsvReporter.enable(new File("/tmp/measurements"), 1, TimeUnit.MINUTES);
      GraphiteReporter.enable(1, TimeUnit.MINUTES, "my.host.name", 2003);
    }
  
    @Override
    protected void doGet(final HttpServletRequest req,
            final HttpServletResponse resp) throws ServletException,
            IOException {
      final TimerContext timerContext = Metrics.newMeter(CreateSessionServlet.class,"myservlet-meter", "requests", TimeUnit.SECONDS).time();
      try {
  ...
    } finally {
        timerContext.stop();
      }
  </code></pre>
  
  <p>with spring annotations and codahale metrics as mentioned <a href="http://metrics.codahale.com/manual/spring/" rel="nofollow">here</a>?</p>
  
  <p>I thought it would be as simple as:</p>
  
  <p>-annotating my servlet like this (I will need gauges and metering eventually):   </p>
  
  <pre><code>@Timed
  @Gauge
  @Metered
  @Override
  protected void doGet(final HttpServletRequest req,
          final HttpServletResponse resp) throws ServletException, IOException {
  </code></pre>
  
  <p>-and updating my spring-servlet to enable the spring annotations as explained on the page mentioned above.</p>
  
  <p>But when I use jconsole, I do not see in the MBeans section any additional entry for that servlet that I instrumented  than for other servlets that do not use any annotation</p>
  
  <p>So my two questions:</p>
  
  <ol>
  <li><p>Is there anything I am missing so that my web app actually sends metric data via JMX?</p></li>
  <li><p>If I want the code with spring annotations to start reporting to a CSV file or to graphite, what do I need to add?</p></li>
  </ol>
  
  <p>Surprisingly I found no complete examples on the web or in the doc from codahale on this. </p>