Jump to content

Schema:MediaViewerPerf

PHP logging

EventLogging::logEvent( 'MediaViewerPerf', 6636500, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"MediaViewerPerf": 6636500
			}
		}
	}
}

JavaScript logging

mw.track( 'event.MediaViewerPerf', { /* ... */ } );
From Meta, a Wikimedia project coordination wiki
Revision 6636500
description"Logs client-side activity related to how Media Viewer performs"
properties
version
type"string"
requiredtrue
description"Log version"
action
type"string"
requiredtrue
enum
"image-load"
"image-resize"
"metadata-fetch"
"gender-fetch"
description"List of possible client-side actions. * image-load: The initial load of the image in the lightbox * image-resize: The load of a resized image * metadata-fetch: Fetching metadata from the API * gender-fetch: Fetching the gender of a user from the API"
milliseconds
type"integer"
requiredtrue
description"How long did it take?"
imageWidth
type"integer"
requiredfalse
description"Width, in pixels, of the requested image. Only for image- actions."
imageHeight
type"integer"
requiredfalse
description"Height, in pixels, of the requested image. Only for image- actions."
fileSize
type"number"
requiredfalse
description"How big the requested file is, in bytes. Only for image- actions."
fileType
type"string"
requiredfalse
description"What type of file was requested. Only for image- actions."
userAgent
type"string"
requiredtrue
description"The user-agent string of the browser running the client side code."