mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #18571 from overleaf/mj-error-reporting-more-info
[web] Add frontend release and load time to error reporting GitOrigin-RevId: f362569d0012131d4538016573d1488b30b5c790
This commit is contained in:
parent
36f0a3e01a
commit
80044b53b4
1 changed files with 6 additions and 1 deletions
|
@ -26,6 +26,8 @@ import { populateReferenceScope } from '@/features/ide-react/context/references-
|
||||||
import { ReactScopeEventEmitter } from '@/features/ide-react/scope-event-emitter/react-scope-event-emitter'
|
import { ReactScopeEventEmitter } from '@/features/ide-react/scope-event-emitter/react-scope-event-emitter'
|
||||||
import getMeta from '@/utils/meta'
|
import getMeta from '@/utils/meta'
|
||||||
|
|
||||||
|
const LOADED_AT = new Date()
|
||||||
|
|
||||||
type IdeReactContextValue = {
|
type IdeReactContextValue = {
|
||||||
projectId: string
|
projectId: string
|
||||||
eventEmitter: IdeEventEmitter
|
eventEmitter: IdeEventEmitter
|
||||||
|
@ -94,6 +96,7 @@ export const IdeReactProvider: FC = ({ children }) => {
|
||||||
)
|
)
|
||||||
const [eventLog] = useState(() => new EventLog())
|
const [eventLog] = useState(() => new EventLog())
|
||||||
const [startedFreeTrial, setStartedFreeTrial] = useState(false)
|
const [startedFreeTrial, setStartedFreeTrial] = useState(false)
|
||||||
|
const release = getMeta('ol-ExposedSettings')?.sentryRelease ?? null
|
||||||
|
|
||||||
// Set to true only after project:joined has fired and all its listeners have
|
// Set to true only after project:joined has fired and all its listeners have
|
||||||
// been called
|
// been called
|
||||||
|
@ -112,6 +115,8 @@ export const IdeReactProvider: FC = ({ children }) => {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
transport: socket.socket?.transport?.name,
|
transport: socket.socket?.transport?.name,
|
||||||
client_now: new Date(),
|
client_now: new Date(),
|
||||||
|
release,
|
||||||
|
client_load: LOADED_AT,
|
||||||
}
|
}
|
||||||
|
|
||||||
const errorObj: Record<string, any> = {}
|
const errorObj: Record<string, any> = {}
|
||||||
|
@ -130,7 +135,7 @@ export const IdeReactProvider: FC = ({ children }) => {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
[socket.socket]
|
[socket.socket, release]
|
||||||
)
|
)
|
||||||
|
|
||||||
// Populate scope values when joining project, then fire project:joined event
|
// Populate scope values when joining project, then fire project:joined event
|
||||||
|
|
Loading…
Reference in a new issue