Initial commit
This commit is contained in:
commit
85eb12a22d
1397 changed files with 173048 additions and 0 deletions
25
shared/logger/node_modules/@sentry/utils/esm/clientreport.js
generated
vendored
Normal file
25
shared/logger/node_modules/@sentry/utils/esm/clientreport.js
generated
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue