PHP logging

EventLogging::logEvent( 'EventCapsule', 17418976, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"EventCapsule": 17418976
			}
		}
	}
}

JavaScript logging

mw.eventLog.logEvent( 'EventCapsule', { /* ... */ } );

Schema:EventCapsule

From Meta, a Wikimedia project coordination wiki
Revision 17418976
Jump to: navigation, search
description"A wrapper around event objects that encodes generic metadata"
properties
event
type"object"
description"The encapsulated event object"
requiredtrue
wiki
type"string"
description"$wgDBName (for example: 'enwiki')"
requiredtrue
webHost
type"string"
description"Request host. 'window.location.hostname' on client-side events; $_SERVER['HTTP_HOST'] on server."
schema
type"string"
description"Title of event schema"
requiredtrue
revision
type"integer"
description"Revision ID of event schema"
requiredtrue
topic
type"string"
description"The queue topic name this event belongs in"
recvFrom
type"string"
description"Hostname of server emitting the log line"
requiredtrue
timestamp
type"number"
description"UTC unix epoch timestamp of event. Optional. Should be the same as dt. Exists for backwards compatibility. See: https://phabricator.wikimedia.org/T179625)"
dt
type"string"
description"UTC ISO-8601 timestamp of event"
format"date-time"
seqId
type"integer"
description"Udp2log sequence ID"
uuid
type"string"
description"Unique event identifier"
format"uuid5-hex"
requiredtrue
userAgent
type"any"
description"User Agent from HTTP request. Either a parsed object, parsed JSON string, or original User-Agent string."
requiredfalse
additionalPropertiesfalse