add b3 header for trace propagation on initial webhook

This commit is contained in:
Dave Horton
2022-03-30 15:12:44 -04:00
parent ff8d7f3648
commit dbe925af05
4 changed files with 29 additions and 5 deletions

View File

@@ -90,6 +90,13 @@ class Task extends Emitter {
return {span, ctx};
}
getTracingPropagation(encoding) {
// TODO: support encodings beyond b3 https://github.com/openzipkin/b3-propagation
if (this.span) {
return `${this.span.spanContext().traceId}-${this.span.spanContext().spanId}-1`;
}
}
/**
* when a subclass Task has completed its work, it should call this method
*/