Skip to content

Commit e9e57d7

Browse files
committed
ref(astro)!: Migrate import hook to makeOrchestrionLoader
Switch the `@sentry/astro/import` loader to the orchestrion-based `makeOrchestrionLoader` and drop the obsolete `./loader` export.
1 parent ba19881 commit e9e57d7

4 files changed

Lines changed: 6 additions & 21 deletions

File tree

MIGRATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Version 11 of the Sentry SDK has new compatibility ranges for runtimes and frame
3434

3535
**Node.js:** The minimum supported Node.js version is now **20.19.0**. Node.js 18 is no longer supported.
3636

37-
**Deno:** The minimum supported Deno version is now **2.8.2**.
37+
**Deno:** The minimum supported Deno version is now **2.8.3**.
3838

3939
**Browsers:** Support for **Safari 14** was dropped. Sentry now requires Safari 15 or higher. For the rest of the browser support matrix, refer to the [Sentry docs](https://docs.sentry.io/platforms/javascript/#browser-support).
4040

@@ -251,6 +251,7 @@ Affected SDKs: All SDKs.
251251
- The `http.query` and `http.fragment` span attributes were renamed to `url.query` and `url.fragment`.
252252
- `network.*` span attributes were aligned across SDKs.
253253
- Legacy messaging (`messaging.*`) and database (`db.statement`, …) span attributes on the AMQP and Redis instrumentations were replaced by their current semantic-convention equivalents.
254+
- The gen_ai cache token attributes `gen_ai.usage.cache_creation_input_tokens` and `gen_ai.usage.cache_read_input_tokens` were renamed to `gen_ai.usage.cache_creation.input_tokens` and `gen_ai.usage.cache_read.input_tokens`.
254255
- Span attributes now use the shared `@sentry/conventions` package under the hood.
255256

256257
If you reference these attributes in custom instrumentation, `beforeSendSpan`, dashboards, or alerts, update them to the new names.
@@ -399,7 +400,6 @@ Sentry.init({
399400
- The `generateInstrumentOnce` export was removed (from `@sentry/node` and the framework SDKs that re-exported it). It wrapped OpenTelemetry's `registerInstrumentations` and is no longer needed now that instrumentation is channel-based.
400401
- The `@sentry/node/loader` entry point was removed. Use `node --import @sentry/node/import` instead.
401402
- (Astro) The `@sentry/astro/loader` entry point was removed. Use `node --import @sentry/astro/import` instead.
402-
- (AWS Lambda) The `@sentry/aws-serverless/loader` entry point was removed. Use `node --import @sentry/aws-serverless/import` instead.
403403
- (Fastify) The deprecated `setShouldHandleError` method was removed.
404404
- (AWS Lambda) The deprecated `disableAwsContextPropagation` option was removed. It no longer had any effect.
405405
- (AWS Lambda) The deprecated `startTrace` option was removed. It no longer had any effect; to disable tracing, set `tracesSampleRate` to `0`.

packages/astro/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@
4242
"import": {
4343
"default": "./build/import-hook.mjs"
4444
}
45-
},
46-
"./loader": {
47-
"import": {
48-
"default": "./build/loader-hook.mjs"
49-
}
5045
}
5146
},
5247
"publishConfig": {
@@ -60,8 +55,8 @@
6055
"@sentry/core": "10.67.0",
6156
"@sentry/conventions": "^0.16.0",
6257
"@sentry/node": "10.67.0",
63-
"@sentry/bundler-plugins": "10.67.0",
64-
"@sentry/server-utils": "10.67.0"
58+
"@sentry/server-utils": "10.67.0",
59+
"@sentry/bundler-plugins": "10.67.0"
6560
},
6661
"devDependencies": {
6762
"astro": "^4.16.19",

packages/astro/rollup.npm.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { makeBaseNPMConfig, makeNPMConfigVariants, makeOtelLoaders } from '@sentry-internal/rollup-utils';
1+
import { makeBaseNPMConfig, makeNPMConfigVariants, makeOrchestrionLoader } from '@sentry-internal/rollup-utils';
22

33
const variants = makeNPMConfigVariants(
44
makeBaseNPMConfig({
@@ -14,4 +14,4 @@ const variants = makeNPMConfigVariants(
1414
}),
1515
);
1616

17-
export default [...variants, ...makeOtelLoaders('./build', 'sentry-node')];
17+
export default [...variants, ...makeOrchestrionLoader('./build')];

packages/node/src/import-hook.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)