Make spans for fetch()
more accurate
#12640
Labels
Feature: Performance
Meta: Good First Issue
Package: browser
Issues related to the Sentry Browser SDK
Problem
In JS
fetch()
basically runs through 3 stages:fetch()
is called and startedfetch()
resolves - generally meaning status code and response headers are returnedAs of today, the spans we record for fetch calls only entail 1 and 2. Since the web is moving more and more towards streaming (LLMs, React Server Components, Server-Sent Events, ...), it would be quite important to also entail the response streams (3).
Solution Brainstorm
There different approaches we can take:
Extend the span to wait for the response body, but attach a child span that tracks the duration until the first byte (entailing 1 and 2).(see comment)The text was updated successfully, but these errors were encountered: