Skip to content

ref: Remove unused _sendEvent method in base client #5026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions packages/browser/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,7 @@ export class BrowserClient extends BaseClient<BrowserClientOptions> {
/**
* @inheritDoc
*/
protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike<Event | null> {
event.platform = event.platform || 'javascript';
return super._prepareEvent(event, scope, hint);
}

/**
* @inheritDoc
*/
protected _sendEvent(event: Event): void {
public sendEvent(event: Event): void {
// We only want to add the sentry event breadcrumb when the user has the breadcrumb integration installed and
// activated its `sentry` option.
// We also do not want to use the `Breadcrumbs` class here directly, because we do not want it to be included in
Expand Down Expand Up @@ -140,7 +132,15 @@ export class BrowserClient extends BaseClient<BrowserClientOptions> {
);
}

super._sendEvent(event);
super.sendEvent(event);
}

/**
* @inheritDoc
*/
protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike<Event | null> {
event.platform = event.platform || 'javascript';
return super._prepareEvent(event, scope, hint);
}

/**
Expand Down
11 changes: 1 addition & 10 deletions packages/core/src/baseclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,15 +545,6 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
}
}

/**
* Sends the passed event
* @param event The Sentry event to send
*/
// TODO(v7): refactor: get rid of method?
protected _sendEvent(event: Event): void {
this.sendEvent(event);
}

/**
* Processes the event and logs an error in case of rejection
* @param event
Expand Down Expand Up @@ -631,7 +622,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
this._updateSessionFromEvent(session, processedEvent);
}

this._sendEvent(processedEvent);
this.sendEvent(processedEvent);
return processedEvent;
})
.then(null, reason => {
Expand Down