Skip to content

Commit f96d47b

Browse files
authored
ref(core): Make getTransport method on client optional (#4013)
1 parent 0e664af commit f96d47b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/tracing/src/transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
106106

107107
this._hub
108108
.getClient()
109-
?.getTransport()
109+
?.getTransport?.()
110110
.recordLostEvent?.(Outcome.SampleRate, 'transaction');
111111

112112
return undefined;

packages/types/src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export interface Client<O extends Options = Options> {
6161
getOptions(): O;
6262

6363
/** Returns clients transport. */
64-
getTransport(): Transport;
64+
getTransport?(): Transport;
6565

6666
/**
6767
* Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.

0 commit comments

Comments
 (0)