mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
Fix/tracing cleanup (#342)
* tracing usability * fix bug in prev commit * more cleanup * further tracing UI cleanup
This commit is contained in:
@@ -761,6 +761,7 @@ class CallSession extends Emitter {
|
||||
}
|
||||
if (!skip) {
|
||||
const {span, ctx} = this.rootSpan.startChildSpan(`verb:${task.summary}`);
|
||||
span.setAttributes({'verb.summary': task.summary});
|
||||
task.span = span;
|
||||
task.ctx = ctx;
|
||||
await task.exec(this, resources);
|
||||
@@ -782,19 +783,22 @@ class CallSession extends Emitter {
|
||||
}
|
||||
|
||||
if (0 === this.tasks.length && this.requestor instanceof WsRequestor && !this.callGone) {
|
||||
let span;
|
||||
//let span;
|
||||
try {
|
||||
const {span} = this.rootSpan.startChildSpan('waiting for commands');
|
||||
const {reason, queue, command} = await this._awaitCommandsOrHangup();
|
||||
//const {span} = this.rootSpan.startChildSpan('waiting for commands');
|
||||
//const {reason, queue, command} = await this._awaitCommandsOrHangup();
|
||||
/*
|
||||
span.setAttributes({
|
||||
'completion.reason': reason,
|
||||
'async.request.queue': queue,
|
||||
'async.request.command': command
|
||||
});
|
||||
span.end();
|
||||
*/
|
||||
await this._awaitCommandsOrHangup();
|
||||
if (this.callGone) break;
|
||||
} catch (err) {
|
||||
span.end();
|
||||
//span.end();
|
||||
this.logger.info(err, 'CallSession:exec - error waiting for new commands');
|
||||
break;
|
||||
}
|
||||
@@ -1288,8 +1292,8 @@ class CallSession extends Emitter {
|
||||
this.wakeupResolver = null;
|
||||
}
|
||||
else {
|
||||
const {span} = this.rootSpan.startChildSpan('async command');
|
||||
const {queue, command} = resolution;
|
||||
const {span} = this.rootSpan.startChildSpan(`recv cmd: ${command}`);
|
||||
span.setAttributes({
|
||||
'async.request.queue': queue,
|
||||
'async.request.command': command
|
||||
|
||||
Reference in New Issue
Block a user