File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,7 @@ export class Controller {
323
323
throw new Error ( 'Invalid contacts received' ) ;
324
324
}
325
325
326
+ tracer . logInfo ( 'Publish in Progress message' ) ;
326
327
const message : PubSubContactsMessage = {
327
328
userId,
328
329
timestamp,
@@ -350,16 +351,17 @@ export class Controller {
350
351
} ;
351
352
352
353
const streamingPromise = streamContacts ( )
353
- . then ( ( ) =>
354
- this . pubSubContactStreamingClient ?. publishMessage ( {
354
+ . then ( ( ) => {
355
+ tracer . logInfo ( 'Publish Complete message' ) ;
356
+ return this . pubSubContactStreamingClient ?. publishMessage ( {
355
357
userId : providerConfig . userId ,
356
358
timestamp,
357
359
contacts : [ ] ,
358
360
state : PubSubContactsState . COMPLETE ,
359
361
integrationName : this . integrationName ,
360
362
traceparent : tracer . getTraceParent ( ) ,
361
- } ) ,
362
- )
363
+ } ) ;
364
+ } )
363
365
. catch ( async ( error ) => {
364
366
tracer . setError ( 'Could not stream contacts' ) ;
365
367
errorLogger (
@@ -368,6 +370,7 @@ export class Controller {
368
370
providerConfig . apiKey ,
369
371
error ,
370
372
) ;
373
+ tracer . logWarning ( 'Publish Failed message' ) ;
371
374
return this . pubSubContactStreamingClient ?. publishMessage ( {
372
375
userId : providerConfig . userId ,
373
376
timestamp,
You can’t perform that action at this time.
0 commit comments