Skip to content

[Feature Request]: Backfill HttpEvents from cached PerformanceResourceTiming with initiator types Fetch, Xhr, and Beacon #580

@williazz

Description

@williazz

Please provide your feature request

RUM can records HTTP requests in two formats:

  1. As an HTTP event with status codes and nested objects for request/response
  2. As a ResourceEvent, which includes full latency breakdown. But no status code or nested object for request/response

There is a gap in RUM's capabilities, however, because (2) can be recorded from the PerformanceAPI cache even if RUM is initialized much later. But (1) can only be recorded at runtime. Instead, RUM should backfill cached PerformanceResourceTiming entries into HttpEvents when HTTP Requests are sent by Fetch, Xhr, and Beacon.

The reason we should do this is because

  1. PerformanceResourceTiming.responseStatus has received broader browser support and should be used in production wherever possible. https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus
  2. Prevent data loss

[Optional] Nice to haves to complete the story

  1. There should be a way to link the ResourceEvent and HttpEvents for the same HTTP requests
  2. There should be a way to observe all beacon requests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions