Skip to content

Commit 5b39f1c

Browse files
committed
move instrument
1 parent f5ca50f commit 5b39f1c

File tree

11 files changed

+29
-29
lines changed

11 files changed

+29
-29
lines changed

packages/core/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@ export { dsnFromString, dsnToString, makeDsn } from './utils-hoist/dsn';
141141
export { SentryError } from './utils-hoist/error';
142142
export { GLOBAL_OBJ } from './utils-hoist/worldwide';
143143
export type { InternalGlobal } from './utils-hoist/worldwide';
144-
export { addConsoleInstrumentationHandler } from './utils-hoist/instrument/console';
145-
export { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler } from './utils-hoist/instrument/fetch';
146-
export { addGlobalErrorInstrumentationHandler } from './utils-hoist/instrument/globalError';
147-
export { addGlobalUnhandledRejectionInstrumentationHandler } from './utils-hoist/instrument/globalUnhandledRejection';
144+
export { addConsoleInstrumentationHandler } from './instrument/console';
145+
export { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler } from './instrument/fetch';
146+
export { addGlobalErrorInstrumentationHandler } from './instrument/globalError';
147+
export { addGlobalUnhandledRejectionInstrumentationHandler } from './instrument/globalUnhandledRejection';
148148
export {
149149
addHandler,
150150
maybeInstrument,
151151
resetInstrumentationHandlers,
152152
triggerHandlers,
153-
} from './utils-hoist/instrument/handlers';
153+
} from './instrument/handlers';
154154
export {
155155
isDOMError,
156156
isDOMException,

packages/core/src/utils-hoist/instrument/console.ts renamed to packages/core/src/instrument/console.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
/* eslint-disable @typescript-eslint/ban-types */
3-
import type { ConsoleLevel, HandlerDataConsole } from '../../types-hoist/instrument';
4-
import { CONSOLE_LEVELS, originalConsoleMethods } from '../logger';
5-
import { fill } from '../object';
6-
import { GLOBAL_OBJ } from '../worldwide';
3+
import type { ConsoleLevel, HandlerDataConsole } from '../types-hoist/instrument';
4+
import { CONSOLE_LEVELS, originalConsoleMethods } from '../utils-hoist/logger';
5+
import { fill } from '../utils-hoist/object';
6+
import { GLOBAL_OBJ } from '../utils-hoist/worldwide';
77
import { addHandler, maybeInstrument, triggerHandlers } from './handlers';
88

99
/**

packages/core/src/utils-hoist/instrument/fetch.ts renamed to packages/core/src/instrument/fetch.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
2-
import type { HandlerDataFetch } from '../../types-hoist/instrument';
3-
import type { WebFetchHeaders } from '../../types-hoist/webfetchapi';
4-
import { isError, isRequest } from '../is';
5-
import { addNonEnumerableProperty, fill } from '../object';
6-
import { supportsNativeFetch } from '../supports';
7-
import { timestampInSeconds } from '../time';
8-
import { GLOBAL_OBJ } from '../worldwide';
2+
import type { HandlerDataFetch } from '../types-hoist/instrument';
3+
import type { WebFetchHeaders } from '../types-hoist/webfetchapi';
4+
import { isError, isRequest } from '../utils-hoist/is';
5+
import { addNonEnumerableProperty, fill } from '../utils-hoist/object';
6+
import { supportsNativeFetch } from '../utils-hoist/supports';
7+
import { timestampInSeconds } from '../utils-hoist/time';
8+
import { GLOBAL_OBJ } from '../utils-hoist/worldwide';
99
import { addHandler, maybeInstrument, triggerHandlers } from './handlers';
1010

1111
type FetchResource = string | { toString(): string } | { url: string };

packages/core/src/utils-hoist/instrument/globalError.ts renamed to packages/core/src/instrument/globalError.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { HandlerDataError } from '../../types-hoist/instrument';
2-
import { GLOBAL_OBJ } from '../worldwide';
1+
import type { HandlerDataError } from '../types-hoist/instrument';
2+
import { GLOBAL_OBJ } from '../utils-hoist/worldwide';
33
import { addHandler, maybeInstrument, triggerHandlers } from './handlers';
44

55
let _oldOnErrorHandler: (typeof GLOBAL_OBJ)['onerror'] | null = null;

packages/core/src/utils-hoist/instrument/globalUnhandledRejection.ts renamed to packages/core/src/instrument/globalUnhandledRejection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { HandlerDataUnhandledRejection } from '../../types-hoist/instrument';
2-
import { GLOBAL_OBJ } from '../worldwide';
1+
import type { HandlerDataUnhandledRejection } from '../types-hoist/instrument';
2+
import { GLOBAL_OBJ } from '../utils-hoist/worldwide';
33
import { addHandler, maybeInstrument, triggerHandlers } from './handlers';
44

55
let _oldOnUnhandledRejectionHandler: (typeof GLOBAL_OBJ)['onunhandledrejection'] | null = null;

packages/core/src/utils-hoist/instrument/handlers.ts renamed to packages/core/src/instrument/handlers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { DEBUG_BUILD } from '../../debug-build';
2-
import { logger } from '../logger';
3-
import { getFunctionName } from '../stacktrace';
1+
import { DEBUG_BUILD } from '../debug-build';
2+
import { logger } from '../utils-hoist/logger';
3+
import { getFunctionName } from '../utils-hoist/stacktrace';
44

55
export type InstrumentHandlerType =
66
| 'console'

packages/core/src/integrations/captureconsole.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { captureException, captureMessage } from '../exports';
33
import { defineIntegration } from '../integration';
44
import type { CaptureContext } from '../scope';
55
import type { IntegrationFn } from '../types-hoist/integration';
6-
import { addConsoleInstrumentationHandler } from '../utils-hoist/instrument/console';
6+
import { addConsoleInstrumentationHandler } from '../instrument/console';
77
import { CONSOLE_LEVELS } from '../utils-hoist/logger';
88
import { addExceptionMechanism } from '../utils-hoist/misc';
99
import { severityLevelFromString } from '../utils-hoist/severity';

packages/core/src/integrations/console.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { addBreadcrumb } from '../breadcrumbs';
22
import { getClient } from '../currentScopes';
33
import { defineIntegration } from '../integration';
44
import type { ConsoleLevel } from '../types-hoist/instrument';
5-
import { addConsoleInstrumentationHandler } from '../utils-hoist/instrument/console';
5+
import { addConsoleInstrumentationHandler } from '../instrument/console';
66
import { CONSOLE_LEVELS } from '../utils-hoist/logger';
77
import { severityLevelFromString } from '../utils-hoist/severity';
88
import { safeJoin } from '../utils-hoist/string';

packages/core/src/logs/console-integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { defineIntegration } from '../integration';
44
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../semanticAttributes';
55
import type { ConsoleLevel } from '../types-hoist/instrument';
66
import type { IntegrationFn } from '../types-hoist/integration';
7-
import { addConsoleInstrumentationHandler } from '../utils-hoist/instrument/console';
7+
import { addConsoleInstrumentationHandler } from '../instrument/console';
88
import { CONSOLE_LEVELS, logger } from '../utils-hoist/logger';
99
import { safeJoin } from '../utils-hoist/string';
1010
import { GLOBAL_OBJ } from '../utils-hoist/worldwide';

packages/core/src/tracing/errors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { DEBUG_BUILD } from '../debug-build';
22
import { getActiveSpan, getRootSpan } from '../utils/spanUtils';
3-
import { addGlobalErrorInstrumentationHandler } from '../utils-hoist/instrument/globalError';
4-
import { addGlobalUnhandledRejectionInstrumentationHandler } from '../utils-hoist/instrument/globalUnhandledRejection';
3+
import { addGlobalErrorInstrumentationHandler } from '../instrument/globalError';
4+
import { addGlobalUnhandledRejectionInstrumentationHandler } from '../instrument/globalUnhandledRejection';
55
import { logger } from '../utils-hoist/logger';
66
import { SPAN_STATUS_ERROR } from './spanstatus';
77

0 commit comments

Comments
 (0)