Skip to content

User interaction instrumentation not working as expected #31

@Abinet18

Description

@Abinet18

When testing user interaction instrumentation with an app, there is an issue of spans not getting created if the
app scripts execute earlier than the instrumentation. I.e if the click handlers in the app script run before the instrumentation
started, it will not be using the wrapped listener.

In apps like react where additional event listeners are added , the instrumentation may catch some of the late coming listeners and it creates a few spans per click, but still if there are fetch calls made from the click, these are not created as children of the root click span , probably because the first event handler is missed(not wrapped) by the instrumentation.

Is there a way to handle such scenario where we cannot ensure the instrumentation
load and execute before the app code. Also would it be possible to keep only the root span for the event discarding the children

related issue/pr

open-telemetry/opentelemetry-js-contrib#1749
open-telemetry/opentelemetry-js-contrib#1750
#27

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions