Open main menu

Extension:WikimediaEvents/Hooks/WikimediaEventsShouldSchemaEditAttemptStepOversample

WikimediaEventsShouldSchemaEditAttemptStepOversample
Available from version 1.35 (Gerrit change 550743)
Decide whether oversampling should be enabled for the EditAttemptStep schema.
Define function:
public static function onWikimediaEventsShouldSchemaEditAttemptStepOversample( IContextSource $context, bool &$shouldOversample ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"WikimediaEventsShouldSchemaEditAttemptStepOversample": "MyExtensionHooks::onWikimediaEventsShouldSchemaEditAttemptStepOversample"
	}
}

For MediaWiki ≤1.25:

$wgHooks['WikimediaEventsShouldSchemaEditAttemptStepOversample'][] = 'MyExtensionHooks::onWikimediaEventsShouldSchemaEditAttemptStepOversample';
Called from:File(s): WikimediaEvents / WikimediaEventsHooks.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:WikimediaEventsShouldSchemaEditAttemptStepOversample extensions.

  • $context - the context object.
  • &$shouldOversample - whether the current event should be logged with probability 1 (as opposed to the normal sampling probability).