Skip to content

[Replay Details] extend Crumb type to include date and relativeMs fields, which are defined as date = new Date(crumb.timestamp) relMs=relativeTimeInMs(crumb, startTs) #47991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ryan953 opened this issue Apr 26, 2023 · 0 comments · Fixed by #48745 or #54066
Assignees

Comments

@ryan953
Copy link
Member

ryan953 commented Apr 26, 2023

No description provided.

@ryan953 ryan953 self-assigned this May 4, 2023
ryan953 added a commit that referenced this issue May 9, 2023
…l in ReplayReader (#48745)

Moving the breadcrumb accessors into ReplayReader. 

There are a few spots that were asking for all the raw breadcrumbs, and
would then filter them down depending on the view. Well, it turns out
that we probably don't need to re-filter everything each time those
different views are rendered; especially since some of those views are
rendered at the same time (timeline, breadcrumbs, +main section).

So this centralizes the filters, and adds `memoize()`

There's some followups I'm thinking about now too:
- Use `ReplaySpan` and `ReplayCrumb` types in all places. Make them both
have subtypes for the different payload flavors (network spans, error
crumbs, nav crumbs, etc).
- Remove calls to `getPrevReplayEvent` from
`static/app/views/replays/detail/breadcrumbs/index.tsx`, we can do that
stuff in css instead!

Related to #47991
volokluev pushed a commit that referenced this issue May 30, 2023
…l in ReplayReader (#48745)

Moving the breadcrumb accessors into ReplayReader. 

There are a few spots that were asking for all the raw breadcrumbs, and
would then filter them down depending on the view. Well, it turns out
that we probably don't need to re-filter everything each time those
different views are rendered; especially since some of those views are
rendered at the same time (timeline, breadcrumbs, +main section).

So this centralizes the filters, and adds `memoize()`

There's some followups I'm thinking about now too:
- Use `ReplaySpan` and `ReplayCrumb` types in all places. Make them both
have subtypes for the different payload flavors (network spans, error
crumbs, nav crumbs, etc).
- Remove calls to `getPrevReplayEvent` from
`static/app/views/replays/detail/breadcrumbs/index.tsx`, we can do that
stuff in css instead!

Related to #47991
ryan953 added a commit that referenced this issue Jun 16, 2023
)

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 #47991
Fixes #50590
Fixes #46130
ryan953 added a commit that referenced this issue Jun 22, 2023
… instead of spans (#51416)

I checked that rendering is the same as before. The secret is that the
network data needs to be sorted, so i added that to the ReplayReader
class.

Also, updated the tooltips:
Before:

![SCR-20230621-nxiw](https://github.com/getsentry/sentry/assets/187460/02e5a655-79be-461f-b3b4-d2cb7d41f604)


After:

![SCR-20230621-nxlh](https://github.com/getsentry/sentry/assets/187460/08ad050b-628a-46a3-a9cf-c35d9c35e105)


Relates to #47991
ryan953 added a commit that referenced this issue Jul 5, 2023
ryan953 added a commit that referenced this issue Jul 28, 2023
…es types (#53660)

Refactored to use the `*Frame` types.

Also, we are now also rendering custom breadcrumbs in the console tab!
see screen shot and `redux.action` rows.

| Note | Before | After |
| --- | --- | --- |
| Console Breadcrumbs |
![SCR-20230726-mcrc](https://github.com/getsentry/sentry/assets/187460/d30d0419-a0f3-4621-b91b-e0bc490f7327)
|
![SCR-20230726-mcsc](https://github.com/getsentry/sentry/assets/187460/1805793a-5f8d-4696-b83f-d7740931c4ea)
|
| Custom breadcrumbs | n/a |
![SCR-20230726-miiq](https://github.com/getsentry/sentry/assets/187460/fdc4b5b5-01a8-462c-a49d-61494aa53ddc)
|


relates to #47991
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.