Inspired by
cb20b5aa5a68d, which added similar instrumentation
during the jQuery 1.11 migration for MediaWiki in 2014.
This way we can plot overall usage in a Grafana dashboard and
help us track the progres of the on-going migration.
Bug: T124742
Change-Id: Ifab13d52d5681189cfb2faae342373558369b8c0
* - Preserve handler of uncaught exceptions in promise chains
* https://gerrit.wikimedia.org/r/#/c/360999/
* https://github.com/jquery/jquery-migrate/pull/262
* - Preserve handler of uncaught exceptions in promise chains
* https://gerrit.wikimedia.org/r/#/c/360999/
* https://github.com/jquery/jquery-migrate/pull/262
+ * - Add mw.track instrumentation for statistics.
*/
;( function( factory ) {
if ( typeof define === "function" && define.amd ) {
*/
;( function( factory ) {
if ( typeof define === "function" && define.amd ) {
if ( !warnedAbout[ msg ] ) {
warnedAbout[ msg ] = true;
jQuery.migrateWarnings.push( msg );
if ( !warnedAbout[ msg ] ) {
warnedAbout[ msg ] = true;
jQuery.migrateWarnings.push( msg );
+ // PATCH: Add instrumentation for statistics --Krinkle
+ mw.track( "mw.deprecate", "jquery-migrate" );
if ( console && console.warn && !jQuery.migrateMute ) {
console.warn( "JQMIGRATE: " + msg );
if ( jQuery.migrateTrace && console.trace ) {
if ( console && console.warn && !jQuery.migrateMute ) {
console.warn( "JQMIGRATE: " + msg );
if ( jQuery.migrateTrace && console.trace ) {