File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
- import { ClientReport , ClientReportEnvelope } from '@sentry/types' ;
1
+ import { ClientReport , ClientReportEnvelope , ClientReportEnvelopeItem } from '@sentry/types' ;
2
2
3
3
import { createEnvelope } from './envelope' ;
4
4
import { dateTimestampInSeconds } from './time' ;
@@ -13,13 +13,13 @@ export function createClientReportEnvelope(
13
13
dsn ?: string ,
14
14
timestamp ?: number ,
15
15
) : ClientReportEnvelope {
16
- const header = dsn ? { dsn } : { } ;
17
-
18
- const itemHeader = { type : 'client_report' } ;
19
- const itemPayload = {
20
- timestamp : timestamp || dateTimestampInSeconds ( ) ,
21
- discarded_events,
22
- } ;
23
-
24
- return createEnvelope < ClientReportEnvelope > ( header , [ [ itemHeader , itemPayload ] ] ) ;
16
+ return createEnvelope < ClientReportEnvelope > ( dsn ? { dsn } : { } , [
17
+ [
18
+ { type : 'client_report' } ,
19
+ {
20
+ timestamp : timestamp || dateTimestampInSeconds ( ) ,
21
+ discarded_events,
22
+ } ,
23
+ ] ,
24
+ ] ) ;
25
25
}
Original file line number Diff line number Diff line change @@ -22,4 +22,4 @@ export * from './syncpromise';
22
22
export * from './time' ;
23
23
export * from './env' ;
24
24
export * from './envelope' ;
25
- export * from './clientreports ' ;
25
+ export * from './clientreport ' ;
You can’t perform that action at this time.
0 commit comments