Skip to content

Link user interaction spans to most recent navigation #732

Open
@bradfrosty

Description

@bradfrosty

Is your feature request related to a problem? Please describe

I would find it useful if user interaction spans were linked via the span options to the previous navigation span (including the document load). When a user interacts with the page, this would allow user interactions to be connected to the specific navigation on which the user interaction occurred. This added context would allow a better understanding of the user flow that we wish to observe.

Describe the solution you'd like to see

The previous navigation span (as created by the user interaction plugin) or the document load span (as created by the document load plugin) are linked into a user interaction span using the link SpanOption.

Describe alternatives you've considered

I've considered creating a span that runs the duration between navigations to capture this context. However, this has clear downsides since the page could be open for a long time.

Additional context

There is an open issue that this feature could partially address: #668.
However, it would only address resources loaded during user interactions. Any resources fetched outside the context of a click handler would not be linked. It also requires usage of the user interaction plugin.

I believe that it might also partially address open-telemetry/opentelemetry-js#610

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions