Uh oh!
There was an error while loading. Please reload this page.
chore: Add missing fields into Replay NetworkRequestData type - #8284
Conversation
mydea
commented
Jun 5, 2023
I think this is not what you think it is :D You are probably looking for |
ryan953
commented
Jun 5, 2023
@mydea What i'm trying to do is import types into sentry so i can have well-typed breadcrumbs/attachments/segments/frames (whatever they're called now) within the ui. this the the data that comes back from the /recording-segments/ api endpoint. |
billyvg
commented
Jun 5, 2023
@ryan953 I can fix this up, what branch on sentry can I test on? |
ryan953
commented
Jun 5, 2023
@billyvg I copy+pasted all the types into |
ryan953
commented
Jun 5, 2023
@billyvg I'm also waiting to merge those two linked PRs after the next SDK bump, so I don't need to copy+paste all the types in. So no rush. |
billyvg
commented
Jun 5, 2023
5b7d63d to
732589eCompare732589e to
13092c3Comparesize-limit report 📦
|
| export * from './replay'; | ||
| export * from './replayFrame'; | ||
| export * from './rrweb'; | ||
| export type { EventType } from '@sentry-internal/rrweb'; |
There was a problem hiding this comment.
I took that duplicate definition out, as you saw below.
Now getsentry/sentry-javascript is importing from '@sentry-internal/rrweb' and getsentry/sentry will import from getsentry/sentry-javascript
hopefully i can skip @sentry-internal/rrweb altogether if i've cross referenced everything correctly.
Uh oh!
There was an error while loading. Please reload this page.
| interface NetworkRequestFrame extends BaseSpanFrame { | ||
| data: NetworkRequestData | ReplayNetworkRequestData; | ||
| op: 'resource.fetch' |
There was a problem hiding this comment.
I think xhr payloads are shaped like ResourceData instead.
Uh oh!
There was an error while loading. Please reload this page.
…ReplayNetworkRequestOrResponse added into NetworkRequestData
Uh oh!
There was an error while loading. Please reload this page.
| export * from './replay'; | ||
| export * from './replayFrame'; | ||
| export * from './rrweb'; | ||
| export type { EventType } from '@sentry-internal/rrweb'; |
There was a problem hiding this comment.
I took that duplicate definition out, as you saw below.
Now getsentry/sentry-javascript is importing from '@sentry-internal/rrweb' and getsentry/sentry will import from getsentry/sentry-javascript
hopefully i can skip @sentry-internal/rrweb altogether if i've cross referenced everything correctly.
| sessionSampleRate: number; | ||
| useCompression: boolean; | ||
| useCompressionOption: boolean; | ||
| } |
There was a problem hiding this comment.
sorted these fields, no changes.
this object is duplicated in sentry, so i'm happy for the re-use here.
| interface NetworkRequestFrame extends BaseSpanFrame { | ||
| data: NetworkRequestData | ReplayNetworkRequestData; | ||
| op: 'resource.fetch' |
There was a problem hiding this comment.
I think xhr payloads are shaped like ResourceData instead.
308fc44 to
69f73eeCompare0d0fefb to
69f73eeCompare| export * from './performance'; | ||
| export * from './replay'; | ||
| export * from './replayFrame'; | ||
| export * from './request'; |
There was a problem hiding this comment.
new file to prevent circular refs.
mydea
commented
Jun 9, 2023
Huh, tests did not actually pass here - it seems it cancelled on |
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).