mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-22 01:27:55 +00:00
add b3 header for trace propagation on initial webhook
This commit is contained in:
@@ -44,6 +44,21 @@ class RootSpan {
|
||||
return this._span.spanContext().traceId;
|
||||
}
|
||||
|
||||
get spanId() {
|
||||
return this._span.spanContext().spanId;
|
||||
}
|
||||
|
||||
get traceFlags() {
|
||||
return this._span.spanContext().traceFlags;
|
||||
}
|
||||
|
||||
getTracingPropagation(encoding) {
|
||||
// TODO: support encodings beyond b3 https://github.com/openzipkin/b3-propagation
|
||||
if (this._span && this.traceId !== '00000000000000000000000000000000') {
|
||||
return `${this.traceId}-${this.spanId}-1`;
|
||||
}
|
||||
}
|
||||
|
||||
setAttributes(attrs) {
|
||||
this._span.setAttributes(attrs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user