@@ -274,8 +274,6 @@ export class Controller {
274
274
res : Response ,
275
275
next : NextFunction ,
276
276
) : Promise < void > {
277
- console . log ( 'traceIdFromHeader' , req . headers . traceparent ) ;
278
-
279
277
const { providerConfig } = req ;
280
278
try {
281
279
if ( ! providerConfig ) {
@@ -293,7 +291,7 @@ export class Controller {
293
291
294
292
infoLogger (
295
293
'streamContacts' ,
296
- `Starting contact streaming ${ timestamp } - orderingKey ${ orderingKey } ` ,
294
+ `[ ${ orderingKey } ] Starting contact streaming ` ,
297
295
providerConfig . apiKey ,
298
296
) ;
299
297
@@ -312,14 +310,13 @@ export class Controller {
312
310
) ,
313
311
state : PubSubContactsState . IN_PROGRESS ,
314
312
integrationName : this . integrationName ,
315
- // traceparent: tracer.getTraceParent(),
316
313
} ,
317
314
orderingKey ,
318
315
) ;
319
316
} catch ( error ) {
320
317
errorLogger (
321
318
'streamContacts' ,
322
- `Could not publish contacts` ,
319
+ `[ ${ orderingKey } ] Could not publish contacts` ,
323
320
providerConfig . apiKey ,
324
321
error ,
325
322
) ;
@@ -352,15 +349,14 @@ export class Controller {
352
349
contacts : [ ] ,
353
350
state : PubSubContactsState . COMPLETE ,
354
351
integrationName : this . integrationName ,
355
- // traceparent: tracer.getTraceParent(),
356
352
} ,
357
353
orderingKey ,
358
354
) ;
359
355
} )
360
356
. catch ( async ( error ) => {
361
357
errorLogger (
362
358
'streamContacts' ,
363
- ' Could not stream contacts' ,
359
+ `[ ${ orderingKey } ] Could not stream contacts` ,
364
360
providerConfig . apiKey ,
365
361
error ,
366
362
) ;
@@ -371,15 +367,14 @@ export class Controller {
371
367
contacts : [ ] ,
372
368
state : PubSubContactsState . FAILED ,
373
369
integrationName : this . integrationName ,
374
- // traceparent: tracer.getTraceParent(),
375
370
} ,
376
371
orderingKey ,
377
372
) ;
378
373
} )
379
374
. catch ( ( error ) => {
380
375
errorLogger (
381
376
'streamContacts' ,
382
- ' Could not publish failed message' ,
377
+ `[ ${ orderingKey } ] Could not publish failed message` ,
383
378
providerConfig . apiKey ,
384
379
error ,
385
380
) ;
@@ -395,14 +390,18 @@ export class Controller {
395
390
} catch ( error ) {
396
391
errorLogger (
397
392
'streamContacts' ,
398
- ' Could not get and refresh token' ,
393
+ `[ ${ orderingKey } ] Could not get and refresh token` ,
399
394
providerConfig . apiKey ,
400
395
error ,
401
396
) ;
402
397
}
403
398
}
404
399
405
- infoLogger ( 'streamContacts' , 'END' , providerConfig . apiKey ) ;
400
+ infoLogger (
401
+ `[${ orderingKey } ] streamContacts` ,
402
+ 'END' ,
403
+ providerConfig . apiKey ,
404
+ ) ;
406
405
407
406
res . status ( 200 ) . send ( { timestamp } ) ;
408
407
@@ -419,7 +418,7 @@ export class Controller {
419
418
420
419
errorLogger (
421
420
'streamContacts' ,
422
- ' Could not stream contacts' ,
421
+ ` Could not stream contacts` ,
423
422
providerConfig ?. apiKey ,
424
423
error ,
425
424
) ;
0 commit comments