-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(fedback): Convert CDN bundles to use async feedback for lower bundle sizes #11791
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
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
69657ad
feat(fedback): Convert CDN bundles to use async feedback by default
ryan953 f471401
export feedbackAsyncIntegration in bundles
ryan953 318e480
export feedbackAsyncIntegration in all the bundles, as well as feedba…
ryan953 c7f2e4a
Merge branch 'develop' into ryan953/feedback-async-default
ryan953 d8994b2
linty
ryan953 b4188c1
fix line breaks
ryan953 f32acf4
linting
ryan953 1e27ac4
linting
ryan953 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
import { browserTracingIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { feedbackAsyncIntegration } from './feedbackAsync'; | ||
|
||
export * from './index.bundle.base'; | ||
|
||
export { feedbackIntegration } from './feedback'; | ||
export { getFeedback } from '@sentry-internal/feedback'; | ||
|
||
export { browserTracingIntegrationShim as browserTracingIntegration, replayIntegrationShim as replayIntegration }; | ||
export { | ||
browserTracingIntegrationShim as browserTracingIntegration, | ||
feedbackAsyncIntegration as feedbackAsyncIntegration, | ||
feedbackAsyncIntegration as feedbackIntegration, | ||
replayIntegrationShim as replayIntegration, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { browserTracingIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { feedbackIntegration } from '../../src'; | ||
import { feedbackAsyncIntegration } from '../../src'; | ||
|
||
import * as FeedbackBundle from '../../src/index.bundle.feedback'; | ||
|
||
describe('index.bundle.feedback', () => { | ||
it('has correct exports', () => { | ||
expect(FeedbackBundle.browserTracingIntegration).toBe(browserTracingIntegrationShim); | ||
expect(FeedbackBundle.feedbackAsyncIntegration).toBe(feedbackAsyncIntegration); | ||
expect(FeedbackBundle.feedbackIntegration).toBe(feedbackAsyncIntegration); | ||
expect(FeedbackBundle.replayIntegration).toBe(replayIntegrationShim); | ||
expect(FeedbackBundle.feedbackIntegration).toBe(feedbackIntegration); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { feedbackIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { replayIntegration } from '@sentry/browser'; | ||
import { browserTracingIntegrationShim, feedbackIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { replayIntegration } from '../../src'; | ||
|
||
import * as ReplayBundle from '../../src/index.bundle.replay'; | ||
|
||
describe('index.bundle.replay', () => { | ||
it('has correct exports', () => { | ||
expect(ReplayBundle.replayIntegration).toBe(replayIntegration); | ||
expect(ReplayBundle.browserTracingIntegration).toBe(browserTracingIntegrationShim); | ||
expect(ReplayBundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim); | ||
expect(ReplayBundle.feedbackIntegration).toBe(feedbackIntegrationShim); | ||
expect(ReplayBundle.replayIntegration).toBe(replayIntegration); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import { feedbackIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { | ||
browserTracingIntegrationShim, | ||
feedbackIntegrationShim, | ||
replayIntegrationShim, | ||
} from '@sentry-internal/integration-shims'; | ||
|
||
import * as Bundle from '../../src/index.bundle'; | ||
|
||
describe('index.bundle', () => { | ||
it('has correct exports', () => { | ||
expect(Bundle.replayIntegration).toBe(replayIntegrationShim); | ||
expect(Bundle.browserTracingIntegration).toBe(browserTracingIntegrationShim); | ||
expect(Bundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim); | ||
expect(Bundle.feedbackIntegration).toBe(feedbackIntegrationShim); | ||
expect(Bundle.replayIntegration).toBe(replayIntegrationShim); | ||
}); | ||
}); |
8 changes: 5 additions & 3 deletions
8
packages/browser/test/unit/index.bundle.tracing.replay.feedback.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { browserTracingIntegration, feedbackIntegration, replayIntegration } from '../../src'; | ||
import { browserTracingIntegration, feedbackAsyncIntegration, replayIntegration } from '../../src'; | ||
|
||
import * as TracingReplayFeedbackBundle from '../../src/index.bundle.tracing.replay.feedback'; | ||
|
||
describe('index.bundle.tracing.replay.feedback', () => { | ||
it('has correct exports', () => { | ||
expect(TracingReplayFeedbackBundle.replayIntegration).toBe(replayIntegration); | ||
expect(TracingReplayFeedbackBundle.browserTracingIntegration).toBe(browserTracingIntegration); | ||
expect(TracingReplayFeedbackBundle.feedbackIntegration).toBe(feedbackIntegration); | ||
expect(TracingReplayFeedbackBundle.feedbackAsyncIntegration).toBe(feedbackAsyncIntegration); | ||
expect(TracingReplayFeedbackBundle.feedbackIntegration).toBe(feedbackAsyncIntegration); | ||
expect(TracingReplayFeedbackBundle.replayIntegration).toBe(replayIntegration); | ||
}); | ||
}); |
7 changes: 3 additions & 4 deletions
7
packages/browser/test/unit/index.bundle.tracing.replay.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import { feedbackIntegrationShim } from '@sentry-internal/integration-shims'; | ||
|
||
import { browserTracingIntegration, replayIntegration } from '../../src'; | ||
|
||
import * as TracingReplayBundle from '../../src/index.bundle.tracing.replay'; | ||
|
||
describe('index.bundle.tracing.replay', () => { | ||
it('has correct exports', () => { | ||
expect(TracingReplayBundle.replayIntegration).toBe(replayIntegration); | ||
|
||
expect(TracingReplayBundle.browserTracingIntegration).toBe(browserTracingIntegration); | ||
|
||
expect(TracingReplayBundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim); | ||
expect(TracingReplayBundle.feedbackIntegration).toBe(feedbackIntegrationShim); | ||
expect(TracingReplayBundle.replayIntegration).toBe(replayIntegration); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { feedbackIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims'; | ||
|
||
import { browserTracingIntegration } from '../../src'; | ||
|
||
import * as TracingBundle from '../../src/index.bundle.tracing'; | ||
|
||
describe('index.bundle.tracing', () => { | ||
it('has correct exports', () => { | ||
expect(TracingBundle.replayIntegration).toBe(replayIntegrationShim); | ||
expect(TracingBundle.browserTracingIntegration).toBe(browserTracingIntegration); | ||
expect(TracingBundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim); | ||
expect(TracingBundle.feedbackIntegration).toBe(feedbackIntegrationShim); | ||
expect(TracingBundle.replayIntegration).toBe(replayIntegrationShim); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the test files were missing various assertions (none of them assert that
getFeedback
or the long list of tracing helpers exist)I made sure they all assert that
browserTracingIntegration
is set, and the order of assertions is consistent to hopefully make it easier going forward to verify what's here and add new ones.