This is an automated email from the ASF dual-hosted git repository.

poorejc pushed a commit to branch zipkinExample
in repository https://gitbox.apache.org/repos/asf/incubator-flagon-useralejs.git


The following commit(s) were added to refs/heads/zipkinExample by this push:
     new 3989c48  removed 'useraction' field from userale logs--moot now
3989c48 is described below

commit 3989c48de40d98f00348ed03d8c5d4133300a134
Author: poorejc <[email protected]>
AuthorDate: Thu Jun 4 23:43:45 2020 -0400

    removed 'useraction' field from userale logs--moot now
---
 example/zipkinExample/browser.js |  8 +++++++-
 example/zipkinExample/bundle.js  | 12 +++++++++++-
 src/packageLogs.js               |  2 --
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/example/zipkinExample/browser.js b/example/zipkinExample/browser.js
index 52cc7ae..bb3af29 100644
--- a/example/zipkinExample/browser.js
+++ b/example/zipkinExample/browser.js
@@ -44,4 +44,10 @@ window.userale.filter(function (log) {
 });
 
 //call zipkinFetch function conditional on click event added in html
-document.getElementById('theButton').addEventListener('click', () => 
ziptest(), false);
+document.getElementById('theButton')
+    .addEventListener('click', () => ziptest(), false);
+
+//@ explore event listeners for wrapped fetch
+self.addEventListener('fetch', function () {
+  console.log("fetch");
+});
\ No newline at end of file
diff --git a/example/zipkinExample/bundle.js b/example/zipkinExample/bundle.js
index 9fad6b9..aec6aac 100644
--- a/example/zipkinExample/bundle.js
+++ b/example/zipkinExample/bundle.js
@@ -26,6 +26,8 @@ const log = text => logEl.innerHTML = 
`${logEl.innerHTML}\n${text}`;
 //    .then(text => log(text))
 //    .catch(err => log(`Failed:\n${err.stack}`));
 
+
+// shove wrapped Fetch call in function
 function ziptest() {
   zipkinFetch('http://localhost:8081/')
     .then(response => (response.text()))
@@ -33,16 +35,24 @@ function ziptest() {
     .catch(err => log(`Failed:\n${err.stack}`));
 }
 
+// test to see function works as expected
 //ziptest();
 
+// useralejs filter--only want clicks
 window.userale.filter(function (log) {
   var type_array = ['mouseup', 'mouseover', 'mousedown', 'keydown', 
'dblclick', 'blur', 'focus', 'input', 'wheel'];
   var logType_array = ['interval'];
   return !type_array.includes(log.type) && 
!logType_array.includes(log.logType);
 });
 
-document.getElementById('theButton').addEventListener('click', () => 
ziptest(), false);
+//call zipkinFetch function conditional on click event added in html
+document.getElementById('theButton')
+    .addEventListener('click', () => ziptest(), false);
 
+//@ explore event listeners for wrapped fetch
+self.addEventListener('fetch', function () {
+  console.log("fetch");
+});
 }).call(this,require('_process'))
 
},{"./recorder":18,"_process":6,"browser-process-hrtime":2,"zipkin":17,"zipkin-instrumentation-fetch":13}],2:[function(require,module,exports){
 (function (process,global){
diff --git a/src/packageLogs.js b/src/packageLogs.js
index e571943..a53eb41 100644
--- a/src/packageLogs.js
+++ b/src/packageLogs.js
@@ -100,7 +100,6 @@ export function packageLog(e, detailFcn) {
     'scrnRes' : getSreenRes(),
     'type' : e.type,
     'logType': 'raw',
-    'userAction' : true,
     'details' : details,
     'userId' : config.userId,
     'toolVersion' : config.version,
@@ -223,7 +222,6 @@ export function packageIntervalLog(e) {
             'logType': 'interval',    
             'targetChange': intervalID !== target,
             'typeChange': intervalType !== type,
-            'userAction': false,
             'userId': config.userId,
             'toolVersion': config.version,
             'toolName': config.toolName,

Reply via email to