Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Setup InteractionTracker to log when a click occurs. #85

Merged

Conversation

crdgonzalezca
Copy link
Contributor

*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

@codecov-io
Copy link

codecov-io commented May 24, 2019

Codecov Report

Merging #85 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6811634...ea1b6ef. Read the comment docs.

import { startInteractionTracker } from '@opencensus/web-instrumentation-zone';

// Necessary import for @opencensus/web-instrumentation-zone
import { Zone, ZoneType, Task } from 'zone.js';
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

import { startInteractionTracker } from '@opencensus/web-instrumentation-zone';

// Necessary import for @opencensus/web-instrumentation-zone
import { Zone, ZoneType, Task } from 'zone.js';
Copy link
Contributor

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.

@draffensperger draffensperger merged commit a35506f into census-instrumentation:master May 28, 2019
@crdgonzalezca crdgonzalezca deleted the user_interaction branch June 6, 2019 13:23
RenaultAI pushed a commit to RenaultAI/opencensus-web that referenced this pull request Nov 20, 2019
- 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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants