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

Difference between revisions of "Orion/Metrics"

m (add ui category)
m (add runtime/uncaughtError)
Line 17: Line 17:
 
<li>help/open</li>
 
<li>help/open</li>
 
<li>preferenceChange</li>
 
<li>preferenceChange</li>
 +
<li>runtime/uncaughtError</li>
 
<li>shell/invoke</li>
 
<li>shell/invoke</li>
 
<li>status/error</li>
 
<li>status/error</li>

Revision as of 15:02, 15 December 2014

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).

Most category/action groups should be self-explanatory, possibly with the exception of the "ui" category. This category is for tracking UI-level events or details that are not already captured by other events. For instance, tracking that a particular button was pressed (if a command is invokable from different places), tracking when a particular UI element is touched or hovered over, etc.

Category/Action:

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

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 (currently implemented in Chrome and IE). 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