main code

This commit is contained in:
Akshat Mehta
2025-11-23 11:03:57 +05:30
parent 0737ead33d
commit edd5728428
705 changed files with 80627 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { createEnvelope } from './envelope.js';
import { dateTimestampInSeconds } from './time.js';
/**
* Creates client report envelope
* @param discarded_events An array of discard events
* @param dsn A DSN that can be set on the header. Optional.
*/
function createClientReportEnvelope(
discarded_events,
dsn,
timestamp,
) {
const clientReportItem = [
{ type: 'client_report' },
{
timestamp: timestamp || dateTimestampInSeconds(),
discarded_events,
},
];
return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);
}
export { createClientReportEnvelope };
//# sourceMappingURL=clientreport.js.map