Skip to content

Commit 02d48f7

Browse files
committed
PR feedback
1 parent 097b5c4 commit 02d48f7

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

packages/core/src/baseclient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
366366
public on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;
367367

368368
/** @inheritdoc */
369-
public on(hook: 'beforeBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;
369+
public on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;
370370

371371
/** @inheritdoc */
372372
public on(hook: string, callback: unknown): void {
@@ -385,7 +385,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
385385
public emit(hook: 'beforeEnvelope', envelope: Envelope): void;
386386

387387
/** @inheritdoc */
388-
public emit(hook: 'beforeBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
388+
public emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
389389

390390
/** @inheritdoc */
391391
public emit(hook: string, ...rest: unknown[]): void {

packages/core/src/hub.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export class Hub implements HubInterface {
272272
if (finalBreadcrumb === null) return;
273273

274274
if (client.emit) {
275-
client.emit('beforeBreadcrumb', finalBreadcrumb, hint);
275+
client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);
276276
}
277277

278278
scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);

packages/integrations/src/extendednetworkbreadcrumbs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class ExtendedNetworkBreadcrumbs implements Integration {
6363
const options = this._options as ExtendedNetworkBreadcrumbsOptions;
6464

6565
if (client && client.on) {
66-
client.on('beforeBreadcrumb', (breadcrumb, hint) => _beforeNetworkBreadcrumb(options, breadcrumb, hint));
66+
client.on('beforeAddBreadcrumb', (breadcrumb, hint) => _beforeNetworkBreadcrumb(options, breadcrumb, hint));
6767
}
6868
}
6969
}

packages/types/src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export interface Client<O extends ClientOptions = ClientOptions> {
167167
/**
168168
* Register a callback before a breadcrumb is added.
169169
*/
170-
on?(hook: 'beforeBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;
170+
on?(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;
171171

172172
/**
173173
* Fire a hook event for transaction start and finish. Expects to be given a transaction as the
@@ -184,5 +184,5 @@ export interface Client<O extends ClientOptions = ClientOptions> {
184184
/**
185185
* Fire a hook for when a bredacrumb is added. Expects the breadcrumb as second argument.
186186
*/
187-
emit?(hook: 'beforeBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
187+
emit?(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
188188
}

0 commit comments

Comments
 (0)