File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,19 @@ export const defaultEventProcessor: EventProcessor = (
23
23
? { ...detail , ...existingMetadata }
24
24
: existingMetadata
25
25
26
+ const inputEvent = entry as InputEvent
27
+
28
+ inputEvent . metadata = metadata
29
+
30
+ if ( ! ( 'operations' in entry ) || typeof entry . operations !== 'object' ) {
31
+ inputEvent . operations = { }
32
+ }
33
+
34
+ if ( typeof inputEvent . event === 'object' ) {
35
+ // the event might have been prepopulated, in which case we don't want to overwrite it
36
+ return inputEvent as Event
37
+ }
38
+
26
39
let kind = entry . entryType
27
40
let commonName = entry . name
28
41
let status : EventStatus = 'ok'
@@ -66,11 +79,6 @@ export const defaultEventProcessor: EventProcessor = (
66
79
} `
67
80
}
68
81
69
- const inputEvent = entry as InputEvent
70
- if ( ! ( 'operations' in entry ) || typeof entry . operations !== 'object' ) {
71
- inputEvent . operations = { }
72
- }
73
- inputEvent . metadata = metadata
74
82
inputEvent . event = { commonName, kind, status }
75
83
76
84
return inputEvent as Event
You can’t perform that action at this time.
0 commit comments