Skip to content

Commit 1394548

Browse files
committed
Fix trace being passed
1 parent 4177c84 commit 1394548

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tracing.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ export class Span {
8282
}
8383

8484
startSpan(name: string, spanOptions?: SpanCreationOptions): Span {
85-
const span = new Span(this.#span.traceId, name, spanOptions);
86-
span.#trace = this.#trace; // TODO: I hate this, fix.
85+
const span = new Span(this.#span.traceId, name, {
86+
trace: this.#trace,
87+
...spanOptions,
88+
});
8789
span.#span.parentId = this.getSpanId();
8890
this.#childSpans.push(span);
8991

0 commit comments

Comments
 (0)