We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99edb51 commit 2bac718Copy full SHA for 2bac718
packages/opentracing/src/spancontext.ts
@@ -5,13 +5,13 @@ import { uuid4 } from '@sentry/utils/misc';
5
export class SpanContext {
6
public constructor(
7
public readonly traceId?: string,
8
- public readonly spanId: string = uuid4(), // private readonly parentId: string,
+ public readonly spanId: string = uuid4().substring(16), // private readonly parentId: string,
9
) {}
10
11
/**
12
* Returns debug version of the span.
13
*/
14
public toString(): string {
15
- return `TraceId: ${this.traceId} SpanId: ${this.spanId}`;
+ return `${(this.traceId && `trace-id:${this.traceId};`) || ''}span-id:${this.spanId}`;
16
}
17
0 commit comments