Skip to content

Instrument browser app screen url #174

@mquentin

Description

@mquentin

Problem statement

So I am looking for a specific OTel RUM instrumentation: I need to know on which screen/page a click interaction happened.

For now we have app.screen.name and app.screen.id which is great as it is agnostic of any browser and mobile context. However for a browser app, I do not see yet a proper way of instrumenting the location.href of my screen.

In the example of a click interaction, I cannot leverage the url.full to hold my location.href as my click did not trigger any network call and therefore the url.full: Absolute URL describing a network resource does not make sense.

Suggested solution

I am suggesting we introduce a new app.screen.url.full field. This field can also match a Mobile context given that a lot of Mobile apps contain webviews and therefore can also have a screen.url.

Like this one can have a app.screen.name: Login and also have a more specific field such as app.screen.url.full:www.myfullurl.com/path?param1...

This would also enable some url browser processor such as https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/web-common/src/SessionLogRecordProcessor.ts that would automatically populate the app.screen.url.full with the browser API location.href without requiring users to configure any app.screen.name.

Alternative solution

An alternative would be to update the definition of url.full to be more permissive and allow holding network or location urls.

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