File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export class ExpressBridge {
4242 if ( process . env . EB_TELEMETRY && this . options . telemetry ) {
4343 console . log ( 'Telemetry enabled, setting trace tag on event.' ) ;
4444 this . telemetry = new Telemetry ( this . options . telemetry ) ;
45- const tag = this . telemetry . tagEvent ( incomingEvent ) ;
45+ this . telemetry . tagEvent ( incomingEvent ) ;
4646 }
4747
4848 await this . telemetry ?. beacon ( 'EB-PROCESS' , {
@@ -54,6 +54,8 @@ export class ExpressBridge {
5454
5555 const matchedPatterns = this . match ( incomingEvent ) ;
5656
57+ console . log ( 'Patterns matched: ' , matchedPatterns ) ;
58+
5759 if ( matchedPatterns . length > 0 ) {
5860 await this . telemetry ?. beacon ( 'EB-MATCH' , {
5961 description : 'Patterns matched for event. Calling assigned handlers.' ,
Original file line number Diff line number Diff line change @@ -42,11 +42,11 @@ export class Telemetry {
4242 for ( const record of payload ) {
4343 record . eb_event_id = record . eb_event_id || tag ;
4444 }
45- } else if ( ! payload ) {
46- event . eb_event_id = event . eb_event_id || tag ;
47- } else {
45+ } else if ( payload ) {
4846 payload = typeof payload === 'string' ? JSON . parse ( payload ) : payload ;
4947 payload . eb_event_id = payload . eb_event_id || tag ;
48+ } else {
49+ event . eb_event_id = event . eb_event_id || tag ;
5050 }
5151
5252 this . eb_event_id = tag ;
You can’t perform that action at this time.
0 commit comments