Skip to content

Commit b6954f9

Browse files
authored
feat(v8/ember): Remove deprecated exports (#10535)
ref #10100
1 parent 09e8dd8 commit b6954f9

File tree

4 files changed

+7
-28
lines changed

4 files changed

+7
-28
lines changed

packages/ember/addon/index.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, applySdkMetadata } from '@sentry/core
99
import { GLOBAL_OBJ } from '@sentry/utils';
1010
import Ember from 'ember';
1111

12-
import type { Transaction } from '@sentry/types';
1312
import type { EmberSentryConfig, GlobalConfig, OwnConfig } from './types';
1413

1514
function _getSentryInitConfig(): EmberSentryConfig['sentry'] {
@@ -60,16 +59,6 @@ export function init(_runtimeConfig?: BrowserOptions): void {
6059
}
6160
}
6261

63-
/**
64-
* Grabs active transaction off scope.
65-
*
66-
* @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.
67-
*/
68-
export const getActiveTransaction = (): Transaction | undefined => {
69-
// eslint-disable-next-line deprecation/deprecation
70-
return Sentry.getCurrentScope().getTransaction();
71-
};
72-
7362
type RouteConstructor = new (...args: ConstructorParameters<typeof Route>) => Route;
7463

7564
export const instrumentRoutePerformance = <T extends RouteConstructor>(BaseRoute: T): T => {

packages/ember/addon/instance-initializers/sentry-performance.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,7 @@ export function _instrumentEmberRouter(
109109
return;
110110
}
111111

112-
if (
113-
url &&
114-
browserTracingOptions.startTransactionOnPageLoad !== false &&
115-
browserTracingOptions.instrumentPageLoad !== false
116-
) {
112+
if (url && browserTracingOptions.instrumentPageLoad !== false) {
117113
const routeInfo = routerService.recognize(url);
118114
Sentry.startBrowserTracingPageLoadSpan(client, {
119115
name: `route:${routeInfo.name}`,
@@ -136,10 +132,7 @@ export function _instrumentEmberRouter(
136132
getBackburner().off('end', finishActiveTransaction);
137133
};
138134

139-
if (
140-
browserTracingOptions.startTransactionOnLocationChange === false &&
141-
browserTracingOptions.instrumentNavigation === false
142-
) {
135+
if (browserTracingOptions.instrumentNavigation === false) {
143136
return;
144137
}
145138

packages/ember/addon/types.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import type { BrowserOptions, BrowserTracing, browserTracingIntegration } from '@sentry/browser';
1+
import type { BrowserOptions, browserTracingIntegration } from '@sentry/browser';
22
import type { Transaction, TransactionContext } from '@sentry/types';
33

4-
type BrowserTracingOptions = Parameters<typeof browserTracingIntegration>[0] &
5-
// eslint-disable-next-line deprecation/deprecation
6-
ConstructorParameters<typeof BrowserTracing>[0];
4+
type BrowserTracingOptions = Parameters<typeof browserTracingIntegration>[0];
75

86
export type EmberSentryConfig = {
97
sentry: BrowserOptions & { browserTracingOptions?: BrowserTracingOptions };

packages/ember/tests/helpers/utils.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,12 @@ export function assertSentryTransactions(
7272
return !op?.startsWith('ui.ember.runloop.') && !op?.startsWith('ui.long-task');
7373
})
7474
.map(s => {
75-
// eslint-disable-next-line deprecation/deprecation
76-
return `${s.op} | ${spanToJSON(s).description}`;
75+
const spanJson = spanToJSON(s);
76+
return `${spanJson.op} | ${spanJson.description}`;
7777
});
7878

7979
assert.true(
80-
// eslint-disable-next-line deprecation/deprecation
81-
spans.some(span => span.op?.startsWith('ui.ember.runloop.')),
80+
spans.some(span => spanToJSON(span).op?.startsWith('ui.ember.runloop.')),
8281
'it captures runloop spans',
8382
);
8483
assert.deepEqual(filteredSpans, options.spans, 'Has correct spans');

0 commit comments

Comments
 (0)