Observability

Monitor the performance and throughput of your OSID application with JMX.

Enabling JMX

Kilimanjaro exposes its activity via JMX.

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.ssl=false

ObjectName Pattern

Every bean lives under the net.okapia.osid.kilimanjaro.jmx domain:

BeanObjectName
OsidProvidernet.okapia.osid.kilimanjaro.jmx:type=OsidProvider,name=<context>.<index>
OsidSessionnet.okapia.osid.kilimanjaro.jmx:type=OsidSession,name=<context><index>
OsidStatsnet.okapia.osid.kilimanjaro.jmx:type=OsidStats,name=<context>.<index>

<index> is a monotonically increasing counter, unique per class within the JVM. Agent, OsidErrorStats, and OsidTypes are not registered as standalone beans — they surface as nested composite data on their parent bean's attributes (getAuthenticatedAgent(), getErrors(), and so on).

What's Collected

OsidProviderMXBean

One instance per runtime, service, or provider.

AttributeTypeMeaning
getIdentifier()String (UUID)unique instance id
getContext()Stringruntime context name
getOsidPackage()StringOSID package, e.g. org.osid
getImplementationName()Stringimplementation class name
getId(), getName(), getDescription(), getVersion()Stringfrom the provider's OsidProfile
getReleaseDate(), getBootTime()Dateimplementation release date / instance boot time
getUptime()long (ms)time since boot
getServices()List<OsidProviderMXBean>child providers/services spawned through this one
getSessions()List<OsidSessionMXBean>active sessions opened on this provider
getStats()OsidStatsMXBeantraffic/error stats for this provider only
getCumulativeStats()OsidStatsMXBeanstats aggregated across this provider and every descendant

OsidSessionMXBean

One instance per open session. Registered from executor.SessionTerm.createSession().

AttributeTypeMeaning
getOsidPackage(), getName(), getImplementationName()Stringsession identity
getLanguageType() / ScriptType() / CalendarType() / TimeType() / CurrencyType() / UnitSystemType()Stringlocale facets in effect
getNumericFormatType() / CalendarFormatType() / TimeFormatType() / CurrencyFormatType() / CoordinateFormatType()Stringlocale display-format facets
getAuthenticatedAgent()AgentMXBeanauthenticated principal, null if none
getEffectiveAgent()AgentMXBeaneffective (possibly impersonated) principal
getEffectiveDate()Datesession's effective date
getStats()OsidStatsMXBeanper-session call/error stats

OsidStatsMXBean & OsidErrorStatsMXBean

Traffic and error counters. Session stats roll up into their provider's stats, which roll up into cumulative stats, which roll up the parent provider's cumulative stats.

AttributeTypeMeaning
getCallsIn() / getCallsOut()longcalls from consumers in / calls out to consumers
getObjectsIn() / getObjectsOut()longobjects transferred in/out
getBytesIn() / getBytesOut()longbytes transferred in/out
getContractErrorsIn() / Out()longconsumer-caused / provider-caused contract violations
getUserErrors()longorg.osid.UserException count
getOperationalErrors()longorg.osid.OperationalException count
getSystemErrors()longjava.lang.Error count
getUnknownErrors()longerrors matching no known OSID exception category
getErrors()List<OsidErrorStatsMXBean>breakdown by exception class name (getName(), getErrorCount())

AgentMXBean & OsidTypesMXBean

AgentMXBean exposes getId(), getGenusType() (or agent:unresolved@okapia.net if unresolved), getName(), and getDescription(). OsidTypesMXBean exposes getId() and getTypes() — a map of supported OSID types keyed by category.

JMX Tools

Since these are plain MXBeans on the platform MBeanServer, any standard JMX client works — no kilimanjaro-specific tool is required:

In any of these, browse the net.okapia.osid.kilimanjaro.jmx domain and drill into the OsidProvider, OsidSession, and OsidStats instances by name.