Guidelines for ProbeProvider and
StatsProvider names
Table of
content
- Introduction
- ProbeProvider
- StatsProvider
Authors : Prashanth Abbagani, Jennifer Chou
Last Modified : 08/07/09
0. Introduction
This document explains the guidelines for writing ProbeProviders and
the StatsProviders that will be written by the module owners.
1. ProbeProvider
Following is the format for writing a ProbeProvider
@ProbeProvider(moduleProviderName="glassfish",
moduleName="web", probeProviderName="http-service")
public class RequestProbeProvider {
@Probe(name="requestStartEvent")
public void requestStartEvent(
The probe id's follow the following format
ProbeID :
<ModuleProviderName>:<ModuleName>:<ProbeProviderName>:<ProbeName>
The guideline for selecting the ProbeID is as follows
<ModuleProviderName> : 'glassfish' would be the name, almost
always. This is important when we are exposing the probes for the
DTrace, where there are several probes coming in from different
products. <ModuleProviderName> will distingush the glassfish
probes from others.
<ModuleName> : A module with significant functionality would have
its name as <ModuleName>. Examples include web-container,
ejb-container, jruby, jersey, connector, security, transaction,
webservices etc.,
<ProbeProviderName> : ProbeProviderName is denoted by the
Sub-module of a Module. This is really specific to the module and the
probe he is trying to name. Example of ProbeProviderName is
session/servlet/jsp/web-module of web-container,
web/webintegration/realm of security module,
webmodule/http-service/runtime-pool of jruby module etc.,
<ProbeName> : This will be the event (method) name of your probe.
Following are various examples on how the probe-id looks like
glassfish:connector-service:work-management:workDequeued
workDequeued(java.lang.String raName)
glassfish:connector:connector-connection-pool:connectionTimedOutEvent
connectionTimedOutEvent(java.lang.String poolName)
glassfish:connector:jdbc-connection-pool:connectionAcquiredEvent
connectionAcquiredEvent(java.lang.String poolName)
glassfish:security:realm:realmAddedEvent
realmAddedEvent(java.lang.String
realmName)
glassfish:security:webintegration:loginFailedEvent
loginFailedEvent(java.lang.String username)
glassfish:ejb-container:ejb:ejbPCCreationStartEvent
ejbPCCreationStartEvent(java.lang.String contextId)
glassfish:jersey:rule:pathAccept accept(java.lang.String ruleName,
java.lang.CharSequence path)
glassfish:jruby:http-stats:requestEndEvent
requestEndEvent(java.lang.String contextPath,
com.sun.grizzly.tcp.http11.GrizzlyRequest request)
glassfish:jruby:runtime-pool:runtimePoolStartEvent
runtimePoolStartEvent(java.lang.String appName)
glassfish:transaction:transaction-service:activated
transactionActivatedEvent()
glassfish:http-service:request:requestEndEvent
requestEndEvent(javax.servlet.http.HttpServletRequest request)
glassfish:web:jsp:jspLoadedEvent jspLoadedEvent(javax.servlet.Servlet
jsp, java.lang.String appName, java.lang.String hostName)
glassfish:web:servlet:servletInitializedEvent
servletInitializedEvent(javax.servlet.Servlet servlet)
glassfish:web:session:sessionActivatedEndEvent
sessionActivatedEndEvent(javax.servlet.http.HttpSession session)
glassfish:webservices:109:undeploy undeploy(java.lang.String name)
2. StatsProvider
For consistency between v2
and v3, between MBean attributes, dotted names, REST, and Admin
Console, as well as across all statistics, please use the following
naming conventions for Attribute IDs and Statistic Names.
- Attribute IDs
- All lowercase
- example @ManagedAttribute(id="activejspsloadedcount")
- Statistic Names
- Capitalize first letter of each word, no spaces
- example new CountStatisticImpl("ActiveJspsLoaded",
This is also added to the Making
Module Monitorable doc.
Some more details on how attribute ids and statistic names are used....
Attribute ids and Statistic names are displayed in the CLI dotted name
from the asadmin get command, REST, Admin Console, and monitoring
MBeans.
CLI dotted-name (asadmin get
--monitor=true server.web.jsp.*)
server.web.jsp.activejspsloadedcount-count
= 1
server.web.jsp.activejspsloadedcount-description = Number of currently
loaded JSPs
server.web.jsp.activejspsloadedcount-lastsampletime = 1249556014500
server.web.jsp.activejspsloadedcount-name = ActiveJspsLoaded
server.web.jsp.activejspsloadedcount-starttime = 1249556014500
server.web.jsp.activejspsloadedcount-unit = count
REST
(http://localhost:4848/monitoring/domain/server/web/jsp)
activejspsloadedcount :
Count : 1
Admin Console
(http://localhost:4848)
Jconsole
