Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Orion/Metrics

< Orion
Revision as of 12:10, 10 December 2014 by Grant gayed.ca.ibm.com (Talk | contribs) (add "status" event category and add mention of "performance" to logTiming)

orion/metrics is the place for logging runtime events and timings to be consumed by an analytics engine. The API follows:

logEvent(category, action, label, value)

The parameters are essentially categorizations of the event progressing from least- to most-specific. The first three parameters are strings, and the fourth (optional) parameter is a number.

A base set of category/action groups has been established (listed below). New kinds of events to be logged should try to fit into an existing group when possible in order to keep the set of namespaces under control. If there really isn't a good place for your new event in the current set of groups then a new category and/or action can be defined (and please update the list below).

Category/Action:

  • command/invoke
  • contentAssist/activate
  • contentAssist/apply
  • editor/action
  • editor/open
  • help/open
  • preferenceChange
  • shell/invoke
  • status/error
  • status/success

logTiming(timingCategory, timingVar, timingValue, timingLabel)

This is similar to log event, but is for recording timings. Timings to be logged should be explicitly measured (ie.- use newDate().getTime() to record the start and end times of a scenario and then subtract them to determine the interval). timingValue should be in milliseconds.

Note that if you're timing something during page loading then the new HTML5 "performance" variable may be helpful; all current page load timings make use of this.

The base set of category/var groups that currently exists:

Category/Var

  • page/complete
  • page/interactive

Back to the top