MediaWikiMetricsClientIntegration(eventLog, eventLogConfig)

Adapts the MediaWiki execution environment for the JavaScript Metrics Platform Client.

See Metrics Platform on Wikitech.

Constructor

new MediaWikiMetricsClientIntegration(eventLog, eventLogConfig) #

Parameters:

Name Type Description
eventLog Object
eventLogConfig Object
Source:

Methods

clone(obj) → {Object} #

Clones the object deeply.

Parameters:

Name Type Description
obj Object
Source:

Returns:

Type
Object
Clones the object deeply.

enqueueEvent(eventData) #

Enqueues the event to be submitted to the event ingestion service.

Parameters:

Name Type Description
eventData Object
Source:
Enqueues the event to be submitted to the event ingestion service.

getContextAttributes() → {Object} #

Gets the values for those context attributes that are available in the execution environment.

Source:

Returns:

Type
Object

Gets the values for those context attributes that are available in the execution environment.

getHostname() → {string} #

Logs the warning to whatever logging backend that the execution environment, e.g. the console.

Source:

Returns:

Type
string
Logs the warning to whatever logging backend that the execution environment, e.g.

getPageviewId() → {string} #

Gets a token unique to the current pageview within the execution environment.

Source:

Returns:

Type
string
Gets a token unique to the current pageview within the execution environment.

getSessionId() → {string} #

Gets a token unique to the current session within the execution environment.

Source:

Returns:

Type
string
Gets a token unique to the current session within the execution environment.

logWarning(string) #

Gets the hostname of the current document.

Parameters:

Name Type Description
string string
Source:
Gets the hostname of the current document.

onSubmit(streamName, eventData) #

Called when an event is enqueued to be submitted to the event ingestion service.

Parameters:

Name Type Description
streamName string
eventData Object
Source:
Called when an event is enqueued to be submitted to the event ingestion service.