mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
bugfix: create spans for nested tasks in gather, rasa, and dial; fix gather bug not starting transcribe after say completes
This commit is contained in:
@@ -81,6 +81,15 @@ class Task extends Emitter {
|
||||
return span;
|
||||
}
|
||||
|
||||
startChildSpan(name, attributes) {
|
||||
const {srf} = require('../..');
|
||||
const {tracer} = srf.locals.otel;
|
||||
const span = tracer.startSpan(name, undefined, this.ctx);
|
||||
if (attributes) span.setAttributes(attributes);
|
||||
const ctx = trace.setSpan(this.ctx, span);
|
||||
return {span, ctx};
|
||||
}
|
||||
|
||||
/**
|
||||
* when a subclass Task has completed its work, it should call this method
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user