add tracing context to all webhooks

This commit is contained in:
Dave Horton
2022-03-30 17:31:21 -04:00
parent 0975d866f3
commit 4284797e85
12 changed files with 62 additions and 20 deletions

View File

@@ -76,7 +76,10 @@ class TaskSipRefer extends Task {
const status = arr[1];
this.logger.debug(`TaskSipRefer:_handleNotify: call got status ${status}`);
if (this.eventHook) {
await cs.requestor.request('verb:hook', this.eventHook, {event: 'transfer-status', call_status: status});
const b3 = this.getTracingPropagation();
const httpHeaders = b3 && {b3};
await cs.requestor.request('verb:hook', this.eventHook,
{event: 'transfer-status', call_status: status}, httpHeaders);
}
if (status >= 200) {
this.referSpan.setAttributes({'refer.finalNotify': status});