You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside replayDataUtils there is a lot of type casting, effectively foo as any as Crumb or whatever.
We should have steps inside here to validate that the objects/params to the methods do indeed match the types that we assign to those objects/structs.
That would prevent issues like e.category.split is not a function or its return value is not iterable. We assume the value was a string but it was false. The SDK can send anything into the server, and the server doesn't mind, breadcrumbs and rrweb events are all stored as json in blob storage, no schema is applied.
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
)
The idea here is that we can have some standard base-types
(BreadcrumbFrame, SpanFrame, and ErrorFrame) which we can return from
our ReplayReader instance. With memoized returns we can reduce the
amount of iterations that we run against the arrays whenever we're
switching tabs in the Replay Details view, this will come at a cost of
some more memory.
This PR focuses on adding the new hydrated type definitions, and doing
the up-front work to insert missing fields to make things consistent and
easy to use. More fields could be added over time too (like bringing
back `transformCrumbs()` or some more specific version.)
To follow up we will need to go through each component and convert types
into the new *Frame system. The only tough areas will be the Breadcrumb
List and Timeline. Both of those expect arrays of type Breadcrumb, but
not they'll be getting Breadcrumb, Spans, and Errors mixed together.
It'll be a small matter of some if-statements and then using the correct
field.
Related to #47991Fixes#50590Fixes#46130
Inside replayDataUtils there is a lot of type casting, effectively
foo as any as Crumb
or whatever.We should have steps inside here to validate that the objects/params to the methods do indeed match the types that we assign to those objects/structs.
That would prevent issues like
e.category.split is not a function or its return value is not iterable
. We assume the value was a string but it wasfalse
. The SDK can send anything into the server, and the server doesn't mind, breadcrumbs and rrweb events are all stored as json in blob storage, no schema is applied.Relates to https://sentry.sentry.io/issues/3913702422/?query=url%3A%2A%2Freplays%2F%2A&referrer=issue-stream
The text was updated successfully, but these errors were encountered: