-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(replay): Deprecate Replay, ReplayCanvas, Feedback classes (#10270)
Instead, users should use the new functional styles. Note that we'll probably actually un-deprecate `Replay` in some form in v8, as we'll be keeping the class around there for sure (as there is a lot of logic in there...). But users should not use it, so deprecating this now! While at it, I also deprecated the old `InitSentryForEmber` method in favor of `init()`. It's slightly unfortunate that I missed this, but we probably shouldn't have exposed `ReplayCanvas` as a class anymore at all 😬 maybe we wait before we document this etc. until we merged the functional style. cc @billyvg
- Loading branch information
Showing
36 changed files
with
279 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,24 @@ | ||
// This is exported so the loader does not fail when switching off Replay/Tracing | ||
import { Feedback } from '@sentry-internal/feedback'; | ||
import { BrowserTracing, Replay, addTracingExtensions } from '@sentry-internal/integration-shims'; | ||
import { Feedback, feedbackIntegration } from '@sentry-internal/feedback'; | ||
import { BrowserTracing, Replay, addTracingExtensions, replayIntegration } from '@sentry-internal/integration-shims'; | ||
|
||
import * as Sentry from './index.bundle.base'; | ||
|
||
// TODO (v8): Remove this as it was only needed for backwards compatibility | ||
// eslint-disable-next-line deprecation/deprecation | ||
Sentry.Integrations.Replay = Replay; | ||
|
||
Sentry.Integrations.BrowserTracing = BrowserTracing; | ||
|
||
export * from './index.bundle.base'; | ||
export { BrowserTracing, addTracingExtensions, Replay, Feedback }; | ||
export { | ||
BrowserTracing, | ||
addTracingExtensions, | ||
// eslint-disable-next-line deprecation/deprecation | ||
Replay, | ||
replayIntegration, | ||
// eslint-disable-next-line deprecation/deprecation | ||
Feedback, | ||
feedbackIntegration, | ||
}; | ||
// Note: We do not export a shim for `Span` here, as that is quite complex and would blow up the bundle |
This file contains 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,29 @@ | ||
// This is exported so the loader does not fail when switching off Replay/Tracing | ||
import { BrowserTracing, Feedback, addTracingExtensions } from '@sentry-internal/integration-shims'; | ||
import { Replay } from '@sentry/replay'; | ||
import { | ||
BrowserTracing, | ||
Feedback, | ||
addTracingExtensions, | ||
feedbackIntegration, | ||
} from '@sentry-internal/integration-shims'; | ||
import { Replay, replayIntegration } from '@sentry/replay'; | ||
|
||
import * as Sentry from './index.bundle.base'; | ||
|
||
// TODO (v8): Remove this as it was only needed for backwards compatibility | ||
// eslint-disable-next-line deprecation/deprecation | ||
Sentry.Integrations.Replay = Replay; | ||
|
||
Sentry.Integrations.BrowserTracing = BrowserTracing; | ||
|
||
export * from './index.bundle.base'; | ||
export { BrowserTracing, addTracingExtensions, Replay, Feedback }; | ||
export { | ||
BrowserTracing, | ||
addTracingExtensions, | ||
// eslint-disable-next-line deprecation/deprecation | ||
Replay, | ||
replayIntegration, | ||
// eslint-disable-next-line deprecation/deprecation | ||
Feedback, | ||
feedbackIntegration, | ||
}; | ||
// Note: We do not export a shim for `Span` here, as that is quite complex and would blow up the bundle |
17 changes: 14 additions & 3 deletions
17
packages/browser/src/index.bundle.tracing.replay.feedback.ts
This file contains 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,18 +1,29 @@ | ||
import { Feedback } from '@sentry-internal/feedback'; | ||
import { Feedback, feedbackIntegration } from '@sentry-internal/feedback'; | ||
import { BrowserTracing, Span, addExtensionMethods } from '@sentry-internal/tracing'; | ||
import { Replay } from '@sentry/replay'; | ||
import { Replay, replayIntegration } from '@sentry/replay'; | ||
|
||
import * as Sentry from './index.bundle.base'; | ||
|
||
// TODO (v8): Remove this as it was only needed for backwards compatibility | ||
// We want replay to be available under Sentry.Replay, to be consistent | ||
// with the NPM package version. | ||
// eslint-disable-next-line deprecation/deprecation | ||
Sentry.Integrations.Replay = Replay; | ||
|
||
Sentry.Integrations.BrowserTracing = BrowserTracing; | ||
|
||
// We are patching the global object with our hub extension methods | ||
addExtensionMethods(); | ||
|
||
export { Feedback, Replay, BrowserTracing, Span, addExtensionMethods }; | ||
export { | ||
// eslint-disable-next-line deprecation/deprecation | ||
Feedback, | ||
// eslint-disable-next-line deprecation/deprecation | ||
Replay, | ||
feedbackIntegration, | ||
replayIntegration, | ||
BrowserTracing, | ||
Span, | ||
addExtensionMethods, | ||
}; | ||
export * from './index.bundle.base'; |
This file contains 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,18 +1,29 @@ | ||
import { Feedback } from '@sentry-internal/integration-shims'; | ||
import { Feedback, feedbackIntegration } from '@sentry-internal/integration-shims'; | ||
import { BrowserTracing, Span, addExtensionMethods } from '@sentry-internal/tracing'; | ||
import { Replay } from '@sentry/replay'; | ||
import { Replay, replayIntegration } from '@sentry/replay'; | ||
|
||
import * as Sentry from './index.bundle.base'; | ||
|
||
// TODO (v8): Remove this as it was only needed for backwards compatibility | ||
// We want replay to be available under Sentry.Replay, to be consistent | ||
// with the NPM package version. | ||
// eslint-disable-next-line deprecation/deprecation | ||
Sentry.Integrations.Replay = Replay; | ||
|
||
Sentry.Integrations.BrowserTracing = BrowserTracing; | ||
|
||
// We are patching the global object with our hub extension methods | ||
addExtensionMethods(); | ||
|
||
export { Feedback, Replay, BrowserTracing, Span, addExtensionMethods }; | ||
export { | ||
// eslint-disable-next-line deprecation/deprecation | ||
Feedback, | ||
// eslint-disable-next-line deprecation/deprecation | ||
Replay, | ||
replayIntegration, | ||
feedbackIntegration, | ||
BrowserTracing, | ||
Span, | ||
addExtensionMethods, | ||
}; | ||
export * from './index.bundle.base'; |
This file contains 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,18 +1,29 @@ | ||
// This is exported so the loader does not fail when switching off Replay | ||
import { Feedback, Replay } from '@sentry-internal/integration-shims'; | ||
import { Feedback, Replay, feedbackIntegration, replayIntegration } from '@sentry-internal/integration-shims'; | ||
import { BrowserTracing, Span, addExtensionMethods } from '@sentry-internal/tracing'; | ||
|
||
import * as Sentry from './index.bundle.base'; | ||
|
||
// TODO (v8): Remove this as it was only needed for backwards compatibility | ||
// We want replay to be available under Sentry.Replay, to be consistent | ||
// with the NPM package version. | ||
// eslint-disable-next-line deprecation/deprecation | ||
Sentry.Integrations.Replay = Replay; | ||
|
||
Sentry.Integrations.BrowserTracing = BrowserTracing; | ||
|
||
// We are patching the global object with our hub extension methods | ||
addExtensionMethods(); | ||
|
||
export { Feedback, Replay, BrowserTracing, Span, addExtensionMethods }; | ||
export { | ||
// eslint-disable-next-line deprecation/deprecation | ||
Feedback, | ||
// eslint-disable-next-line deprecation/deprecation | ||
Replay, | ||
feedbackIntegration, | ||
replayIntegration, | ||
BrowserTracing, | ||
Span, | ||
addExtensionMethods, | ||
}; | ||
export * from './index.bundle.base'; |
This file contains 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,13 +1,30 @@ | ||
// This is exported so the loader does not fail when switching off Replay/Tracing | ||
import { BrowserTracing, Feedback, Replay, addTracingExtensions } from '@sentry-internal/integration-shims'; | ||
import { | ||
BrowserTracing, | ||
Feedback, | ||
Replay, | ||
addTracingExtensions, | ||
feedbackIntegration, | ||
replayIntegration, | ||
} from '@sentry-internal/integration-shims'; | ||
|
||
import * as Sentry from './index.bundle.base'; | ||
|
||
// TODO (v8): Remove this as it was only needed for backwards compatibility | ||
// eslint-disable-next-line deprecation/deprecation | ||
Sentry.Integrations.Replay = Replay; | ||
|
||
Sentry.Integrations.BrowserTracing = BrowserTracing; | ||
|
||
export * from './index.bundle.base'; | ||
export { BrowserTracing, addTracingExtensions, Replay, Feedback }; | ||
export { | ||
BrowserTracing, | ||
addTracingExtensions, | ||
// eslint-disable-next-line deprecation/deprecation | ||
Replay, | ||
// eslint-disable-next-line deprecation/deprecation | ||
Feedback, | ||
feedbackIntegration, | ||
replayIntegration, | ||
}; | ||
// Note: We do not export a shim for `Span` here, as that is quite complex and would blow up the bundle |
This file contains 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 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 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 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 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
Oops, something went wrong.