[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.18]: Log javascript errors during search satisfaction tests

2017-09-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/379432 )

Change subject: Log javascript errors during search satisfaction tests
..


Log javascript errors during search satisfaction tests

We have some unexplained problems with data collection recently:
* The interleaved AB test didn't send the trigger key with all expected
  searches
* Sampling rates combined with recorded sessions are off by about 5x
  from what we might expect based on backend logging.

Perhaps these are due to javascript errors occuring in the browser
that we can't see. Log them to get some insight.

Change-Id: Ibd7c9aa9eaa6c15c3a0cd5c9305eebcc30103c4f
---
M extension.json
M modules/ext.wikimediaEvents.searchSatisfaction.js
2 files changed, 24 insertions(+), 1 deletion(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index db369ac..cf41ccd 100644
--- a/extension.json
+++ b/extension.json
@@ -119,6 +119,11 @@
"schema": "TestSearchSatisfaction2",
"revision": 16909631
},
+   "schema.SearchSatisfactionErrors": {
+   "class": "ResourceLoaderSchemaModule",
+   "schema": "SearchSatisfactionErrors",
+   "revision": 17181648
+   },
"schema.GeoFeatures": {
"class": "ResourceLoaderSchemaModule",
"schema": "GeoFeatures",
diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 15ec52a..30fb174 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -25,7 +25,7 @@
return;
}
 
-   var search, autoComplete, session, eventLog, initSubTest,
+   var search, autoComplete, session, eventLog, initSubTest, 
initDebugLogging,
isSearchResultPage = mw.config.get( 'wgIsSearchResultPage' ),
uri = new mw.Uri( location.href ),
checkinTimes = [ 10, 20, 30, 40, 50, 60, 90, 120, 150, 180, 
210, 240, 300, 360, 420 ],
@@ -930,6 +930,23 @@
}
} );
 
+   initDebugLogging = atMostOnce( function ( session ) {
+   mw.trackSubscribe( 'global.error', function ( topic, data ) {
+   var evt = {
+   searchSessionId: session.get( 'sessionId' ),
+   visitPageId: session.get( 'pageViewId' ),
+   message: data.errorMessage,
+   error: data.errorObject.toString()
+   };
+
+   // ship the event
+   mw.loader.using( [ 'schema.SearchSatisfactionErrors' ] 
).then( function () {
+   eventLog = eventLog || extendMwEventLog();
+   eventLog.logEvent( 'TestSearchSatisfaction2', 
evt );
+   } );
+   } );
+   } );
+
/**
 * Delay session initialization as late in the
 * process as possible, but only do it once.
@@ -940,6 +957,7 @@
session = session || new SessionState();
 
if ( session.isActive() ) {
+   initDebugLogging( session );
initSubTest( session );
fn( session );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/379432
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd7c9aa9eaa6c15c3a0cd5c9305eebcc30103c4f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.30.0-wmf.18
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.18]: Log javascript errors during search satisfaction tests

2017-09-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379432 )

Change subject: Log javascript errors during search satisfaction tests
..

Log javascript errors during search satisfaction tests

We have some unexplained problems with data collection recently:
* The interleaved AB test didn't send the trigger key with all expected
  searches
* Sampling rates combined with recorded sessions are off by about 5x
  from what we might expect based on backend logging.

Perhaps these are due to javascript errors occuring in the browser
that we can't see. Log them to get some insight.

Change-Id: Ibd7c9aa9eaa6c15c3a0cd5c9305eebcc30103c4f
---
M extension.json
M modules/ext.wikimediaEvents.searchSatisfaction.js
2 files changed, 24 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/32/379432/1

diff --git a/extension.json b/extension.json
index db369ac..cf41ccd 100644
--- a/extension.json
+++ b/extension.json
@@ -119,6 +119,11 @@
"schema": "TestSearchSatisfaction2",
"revision": 16909631
},
+   "schema.SearchSatisfactionErrors": {
+   "class": "ResourceLoaderSchemaModule",
+   "schema": "SearchSatisfactionErrors",
+   "revision": 17181648
+   },
"schema.GeoFeatures": {
"class": "ResourceLoaderSchemaModule",
"schema": "GeoFeatures",
diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 15ec52a..30fb174 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -25,7 +25,7 @@
return;
}
 
-   var search, autoComplete, session, eventLog, initSubTest,
+   var search, autoComplete, session, eventLog, initSubTest, 
initDebugLogging,
isSearchResultPage = mw.config.get( 'wgIsSearchResultPage' ),
uri = new mw.Uri( location.href ),
checkinTimes = [ 10, 20, 30, 40, 50, 60, 90, 120, 150, 180, 
210, 240, 300, 360, 420 ],
@@ -930,6 +930,23 @@
}
} );
 
+   initDebugLogging = atMostOnce( function ( session ) {
+   mw.trackSubscribe( 'global.error', function ( topic, data ) {
+   var evt = {
+   searchSessionId: session.get( 'sessionId' ),
+   visitPageId: session.get( 'pageViewId' ),
+   message: data.errorMessage,
+   error: data.errorObject.toString()
+   };
+
+   // ship the event
+   mw.loader.using( [ 'schema.SearchSatisfactionErrors' ] 
).then( function () {
+   eventLog = eventLog || extendMwEventLog();
+   eventLog.logEvent( 'TestSearchSatisfaction2', 
evt );
+   } );
+   } );
+   } );
+
/**
 * Delay session initialization as late in the
 * process as possible, but only do it once.
@@ -940,6 +957,7 @@
session = session || new SessionState();
 
if ( session.isActive() ) {
+   initDebugLogging( session );
initSubTest( session );
fn( session );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/379432
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd7c9aa9eaa6c15c3a0cd5c9305eebcc30103c4f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.30.0-wmf.18
Gerrit-Owner: EBernhardson 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits