mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
tracing usability
This commit is contained in:
@@ -784,6 +784,7 @@ class CallSession extends Emitter {
|
|||||||
if (0 === this.tasks.length && this.requestor instanceof WsRequestor && !this.callGone) {
|
if (0 === this.tasks.length && this.requestor instanceof WsRequestor && !this.callGone) {
|
||||||
let span;
|
let span;
|
||||||
try {
|
try {
|
||||||
|
/*
|
||||||
const {span} = this.rootSpan.startChildSpan('waiting for commands');
|
const {span} = this.rootSpan.startChildSpan('waiting for commands');
|
||||||
const {reason, queue, command} = await this._awaitCommandsOrHangup();
|
const {reason, queue, command} = await this._awaitCommandsOrHangup();
|
||||||
span.setAttributes({
|
span.setAttributes({
|
||||||
@@ -792,6 +793,7 @@ class CallSession extends Emitter {
|
|||||||
'async.request.command': command
|
'async.request.command': command
|
||||||
});
|
});
|
||||||
span.end();
|
span.end();
|
||||||
|
*/
|
||||||
if (this.callGone) break;
|
if (this.callGone) break;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
span.end();
|
span.end();
|
||||||
@@ -1288,11 +1290,10 @@ class CallSession extends Emitter {
|
|||||||
this.wakeupResolver = null;
|
this.wakeupResolver = null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const {span} = this.rootSpan.startChildSpan('async command');
|
|
||||||
const {queue, command} = resolution;
|
const {queue, command} = resolution;
|
||||||
|
const {span} = this.rootSpan.startChildSpan(`recv: ${command}`);
|
||||||
span.setAttributes({
|
span.setAttributes({
|
||||||
'async.request.queue': queue,
|
'async.request.queue': queue,
|
||||||
'async.request.command': command
|
|
||||||
});
|
});
|
||||||
span.end();
|
span.end();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ class Task extends Emitter {
|
|||||||
if (this.actionHook) {
|
if (this.actionHook) {
|
||||||
const type = this.name === TaskName.Redirect ? 'session:redirect' : 'verb:hook';
|
const type = this.name === TaskName.Redirect ? 'session:redirect' : 'verb:hook';
|
||||||
const params = results ? Object.assign(this.cs.callInfo.toJSON(), results) : this.cs.callInfo.toJSON();
|
const params = results ? Object.assign(this.cs.callInfo.toJSON(), results) : this.cs.callInfo.toJSON();
|
||||||
const span = this.startSpan(type, {'hook.url': this.actionHook});
|
const span = this.startSpan(`${type} (${this.actionHook}`);
|
||||||
const b3 = this.getTracingPropagation('b3', span);
|
const b3 = this.getTracingPropagation('b3', span);
|
||||||
const httpHeaders = b3 && {b3};
|
const httpHeaders = b3 && {b3};
|
||||||
span.setAttributes({'http.body': JSON.stringify(params)});
|
span.setAttributes({'http.body': JSON.stringify(params)});
|
||||||
|
|||||||
Reference in New Issue
Block a user