Skip to content

Commit

Permalink
tracing transport fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad committed Apr 19, 2022
1 parent acad6d4 commit 62e0af6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/tracing/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ export class Transaction extends SpanClass implements TransactionInterface {
// At this point if `sampled !== true` we want to discard the transaction.
IS_DEBUG_BUILD && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');

const client = this._hub.getClient();
const transport = client && client.getTransport && client.getTransport();
if (transport && transport.recordLostEvent) {
transport.recordLostEvent('sample_rate', 'transaction');
}
// TODO(v7): Add back client reports functionality
// const client = this._hub.getClient();
// const transport = client && client.getTransport && client.getTransport();
// if (transport && transport.recordLostEvent) {
// transport.recordLostEvent('sample_rate', 'transaction');
// }
return undefined;
}

Expand Down

0 comments on commit 62e0af6

Please sign in to comment.