Skip to content

Commit a9b8935

Browse files
committed
feat: Add logger for transport usage
1 parent 8dded33 commit a9b8935

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/core/src/basebackend.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export abstract class BaseBackend<O extends Options> implements Backend {
9494
* @inheritDoc
9595
*/
9696
public sendEvent(event: Event): void {
97+
logger.log(`Sending event with ${this.transport.constructor.name}`);
9798
this.transport.sendEvent(event).catch(reason => {
9899
logger.error(`Error while sending event: ${reason}`);
99100
});

packages/opentracing/src/spancontext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import { uuid4 } from '@sentry/utils/misc';
55
export class SpanContext {
66
public constructor(
77
public readonly traceId?: string,
8-
public readonly spanId: string = uuid4(), // private readonly parentId: string,
8+
public readonly spanId: string = uuid4().substring(16), // private readonly parentId: string,
99
) {}
1010

1111
/**
1212
* Returns debug version of the span.
1313
*/
1414
public toString(): string {
15-
return `TraceId: ${this.traceId} SpanId: ${this.spanId}`;
15+
return `${(this.traceId && `trace-id:${this.traceId};`) || ''}span-id:${this.spanId}`;
1616
}
1717
}

0 commit comments

Comments
 (0)