Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] trying to use ststistics handler in 9.3.x

I'm currently running 9.3.8.v20160314.

I'm trying to explore the statistics handler has described here:

  http://www.eclipse.org/jetty/documentation/current/statistics-handler.html

That page refers to:

- Connector statistics
- Request statistics

among other things.

I'm trying to employ both, but I'm running into grief, and don't
know how to work around it.

First, to describe the results of setting up connector statistics:

The connector stats effort is confusing me.  That page above describes
adding a bean, like this, to my connector:

        <!-- Enable Connection Statistics -->
        <Call name="addBean">
          <Arg>
              <New id="ConnectionStatistics"
class="org.eclipse.jetty.io.ConnectionStatistics"/>
          </Arg>
        </Call>

but, that effort fails when I start the server:

  Exception in thread "main" java.lang.ClassNotFoundException:
  org.eclipse.jetty.io.ConnectionStatistics

This Stackoverflow thread says I should perhaps be using a different
class:

  https://stackoverflow.com/questions/19728286/how-do-i-gather-connection-statistics-in-jetty-9

    The ConnectorStatistics module has been deprecated in 9.3.14+.
    Use ServerConnectionStatistics.addToAllConnectors(server);

When I replace my addbean above with this other class:

  New id="ConnectionStatistics"
  class="org.eclipse.jetty.server.ServerConnectionStatistics"/>

That also yields a java.lang.ClassNotFoundException exception.

- Would upgrading from 9.3.8.v20160314 to something newer than
  9.3.14 allow this latter class to work the way I'm trying to use
  it?

- Should the ConnectionStatistics class be working for the version
  I'm currently using?

In contrast, my efforts to employ the request stats was easy, and
nothing broke:

  java -jar {$jetty.home}/start.jar --stats

But I don't see what beans this exposes; I don't see anything obvious
when I review things with jconsole.

What should I be seeing?

-- 
Brian Reichert				<reichert@xxxxxxxxxxx>
BSD admin/developer at large	


Back to the top