-
Notifications
You must be signed in to change notification settings - Fork 21
Setup InteractionTracker to log when a click occurs. #85
Setup InteractionTracker to log when a click occurs. #85
Conversation
…ass, create bundles and make it work with user interaction example.
Codecov Report
@@ Coverage Diff @@
## master #85 +/- ##
=======================================
Coverage 96.46% 96.46%
=======================================
Files 26 26
Lines 622 622
Branches 76 76
=======================================
Hits 600 600
Misses 22 22 Continue to review full report at Codecov.
|
import { startInteractionTracker } from '@opencensus/web-instrumentation-zone'; | ||
|
||
// Necessary import for @opencensus/web-instrumentation-zone | ||
import { Zone, ZoneType, Task } from 'zone.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit surprised this line is needed here. What happens if you remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already did that but compilation fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, we can leave it in there for now. Longer term we will want to think about how to bring in Zone.js cleanly, but for now if this is needed we can keep it.
packages/opencensus-web-instrumentation-zone/src/interaction-tracker.ts
Outdated
Show resolved
Hide resolved
import { startInteractionTracker } from '@opencensus/web-instrumentation-zone'; | ||
|
||
// Necessary import for @opencensus/web-instrumentation-zone | ||
import { Zone, ZoneType, Task } from 'zone.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, we can leave it in there for now. Longer term we will want to think about how to bring in Zone.js cleanly, but for now if this is needed we can keep it.
- Shorter names for variables and types. - Print flag values instead of pointer values. - Use -config instead of -exporters-yaml because config contains more than exporters.
*Setup @opencensus/web-instrumentation-zone with InteractionTracker class to start the monkey-patch on Zone.js.
*Add dependencies in @opencensus/web-instrumentation-zone and user_interaction example.
*The InteractionTracker logs when the button is clicked, this is when a task is running, also, logs when a task is scheduled and canceled.
*Setup bundle configuration for @opencensus/web-instrumentation-zone