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
I'm trying to use the library with playwrigth (that uses puppeteer under the hood) but I have an issue with the events sent with the /envelope sentry's endpoint.
Basically the event envelope type on puppeteer is not recorded on the reports array.
// testkit.tsconstcreatePuppeteerHandler=(baseUrl: string)=>(request: any)=>{consturl=request.url()if(!url.startsWith(baseUrl)){return}constpath=url.substring(baseUrl.length)if(/\/api\/[0-9]*\/store/.test(path)){reports.push(transformReport(JSON.parse(request.postData())))}if(/\/api\/[0-9]*\/envelope/.test(path)){// <-- Here we are not handling the eventconst{ type, payload }=parseEnvelopeRequest(request.postData())if(type==='transaction'){transactions.push(transformTransaction(payload))}}}
// parser.tsexportfunctionhandleEnvelopeRequestData(// <-- This function correctly handles the "event"requestBody: any,testkit: Testkit): void{const{ type, payload }=parseEnvelopeRequest(requestBody)if(type==='transaction'){testkit.transactions().push(transformTransaction(payload))}elseif(type==='event'){testkit.reports().push(transformReport(payload))}}
Is there a reason for that? Eventually I can open a Pull Request for it.
The text was updated successfully, but these errors were encountered:
I'm trying to use the library with playwrigth (that uses puppeteer under the hood) but I have an issue with the events sent with the
/envelope
sentry's endpoint.Basically the
event
envelope type on puppeteer is not recorded on the reports array.Is there a reason for that? Eventually I can open a Pull Request for it.
The text was updated successfully, but these errors were encountered: