add channel to transcribe, gather, and dtmf spans (#376)

This commit is contained in:
Dave Horton
2023-06-13 09:12:26 -04:00
committed by GitHub
parent 7cd6c27f90
commit a7d07ce7ae
3 changed files with 31 additions and 7 deletions

View File

@@ -817,7 +817,11 @@ class TaskGather extends Task {
this.logger.debug({evt}, 'TaskGather:resolve buffered results');
}
this.span.setAttributes({'stt.resolve': reason, 'stt.result': JSON.stringify(evt)});
this.span.setAttributes({
channel: 1,
'stt.resolve': reason,
'stt.result': JSON.stringify(evt)
});
if (this.needsStt && this.ep && this.ep.connected) {
this.ep.stopTranscription({vendor: this.vendor})
.catch((err) => this.logger.error({err}, 'Error stopping transcription'));