[@opentelemetry/instrumentation-user-interaction] No spans created without Zone.js #1750
Labels
bug
Something isn't working
has:reproducer
This bug/feature has a minimal reproduction provided
pkg:instrumentation-user-interaction
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
What version of OpenTelemetry are you using?
What version of Node are you using?
v16
What did you do?
Scenario 1:
Scenario 2:
Here is a branch to see the code I was testing this with: https://github.com/honeycombio/example-greeting-service/tree/purvi/user-interaction-repro
What did you expect to see?
In both cases, expected to see spans for all click events on a button and a link.
What did you see instead?
Scenario 1: Saw spans created for the click event from only a button, not a link
Scenario 2: Did not see any spans created
Additional context
I dug into the code a little bit and found that while the
addEventListener
andremoveEventListener
functions were being patched by the instrumentation, the event listeners were never actually being registered. So I tested manually adding an event listener for click events in my app setup code and then the instrumentation worked as expected. I've drafted a PR for the instrumentation to add event listeners for each of the events on init as a potential fix to this and tested it it out locally. Here's the PR: #1749The text was updated successfully, but these errors were encountered: