Skip to content

feat(core): Deprecate API class - #4281

Merged
AbhiPrasad merged 8 commits into
masterfrom
abhi-deprecate-api-class
Dec 14, 2021
Merged

feat(core): Deprecate API class#4281
AbhiPrasad merged 8 commits into
masterfrom
abhi-deprecate-api-class

Conversation

@AbhiPrasad

@AbhiPrasadAbhiPrasad commented Dec 14, 2021

Copy link
Copy Markdown
Contributor

Trying to minimize behaviour differences until we properly refactor the transports as per Extract out transports into their own modules in #4240

@github-actions

github-actionsBot commented Dec 14, 2021

Copy link
Copy Markdown
Contributor

size-limit report

PathBase Size (f042723)Current SizeChange
@sentry/browser - CDN Bundle (gzipped)21.67 KB21.44 KB-1.09% 🔽
@sentry/browser - Webpack23.35 KB23.25 KB-0.42% 🔽
@sentry/browser - Webpack - gzip = false82.8 KB82.15 KB-0.8% 🔽
@sentry/react - Webpack23.38 KB23.29 KB-0.41% 🔽
@sentry/nextjs Client - Webpack48.01 KB47.92 KB-0.21% 🔽
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped)29.99 KB29.77 KB-0.73% 🔽

@AbhiPrasad
AbhiPrasad marked this pull request as ready for review December 14, 2021 16:21

/** Helper to get Sentry API endpoints. */
protected readonly _api: API;
protected readonly _api: APIDetails;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is okay but generally I think this design still makes it hard for us to make improvements later. Unfortunately the subclassing situation will always be bad for minification but quite user friendly for custom transports, so it might be acceptable to do it this way.

In Python as an example we push the original options in (there are no transport options) and the transports pull from there what they need. We should probably not change this right now, but longer term I think that might be preferable here as well.

@AbhiPrasadAbhiPrasadDec 14, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely agree - but we can revisit this when we examine transports more holistically later on. I kept this pattern primarily to minimize the diff and possibilities for breakage.

original options in (there are no transport options) and the transports pull from there what they need

This is the direction we should head in, actually we might be able to pull it off before the major

@AbhiPrasad
AbhiPrasad enabled auto-merge (squash) December 14, 2021 18:07
@AbhiPrasad
AbhiPrasad merged commit f5958a4 into masterDec 14, 2021
@AbhiPrasad
AbhiPrasad deleted the abhi-deprecate-api-class branch December 14, 2021 18:20
onurtemizkan pushed a commit that referenced this pull request Dec 19, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@AbhiPrasad@mitsuhiko