![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@sentry/astro
Advanced tools
This SDK is in Beta and not yet fully stable. If you have feedback or encounter any bugs, feel free to open an issue.
This package is a wrapper around @sentry/node
for the server and @sentry/browser
for the client side.
Install the Sentry Astro SDK with the astro
CLI:
npx astro add @sentry/astro
Add your DSN and source maps upload configuration:
import { defineConfig } from 'astro/config';
import sentry from '@sentry/astro';
export default defineConfig({
integrations: [
sentry({
dsn: '__DSN__',
sourceMapsUploadOptions: {
project: 'your-sentry-project-slug',
authToken: process.env.SENTRY_AUTH_TOKEN,
},
}),
],
});
Follow this guide to create an auth token and add it to your environment variables:
SENTRY_AUTH_TOKEN="your-token"
For Astro apps configured for (hybrid) Server Side Rendering (SSR), the Sentry integration will automatically add middleware to your server to instrument incoming requests if you're using Astro 3.5.2 or newer.
If you're using Astro <3.5.2, complete the setup by adding the Sentry middleware to your src/middleware.js
file:
// src/middleware.js
import { sequence } from 'astro:middleware';
import * as Sentry from '@sentry/astro';
export const onRequest = sequence(
Sentry.handleRequest(),
// Add your other handlers after Sentry.handleRequest()
);
The Sentry middleware enhances the data collected by Sentry on the server side by:
You can opt out of using the automatic sentry server instrumentation in your astro.config.mjs
file:
import { defineConfig } from 'astro/config';
import sentry from '@sentry/astro';
export default defineConfig({
integrations: [
sentry({
dsn: '__DSN__',
autoInstrumentation: {
requestHandler: false,
},
}),
],
});
Check out our docs for configuring your SDK setup:
8.0.0-alpha.4
This is the fourth Alpha release of the v8 cycle, which includes a variety of breaking changes.
Read the in-depth migration guide to find out how to address any breaking changes in your code.
The minimum Node version required for the SDK is now 14.18.0
.
@sentry/google-cloud-serverless
(#11065)@sentry/serverless
is no longer published, and is replaced by two new packages: @sentry/google-cloud-serverless
and
@sentry/aws-serverless
. These packages are now the recommended way to instrument serverless functions. See the
migration guide for more details.
The Browser SDK and CDN bundles now emits ES2017 compatible code and drops support for IE11. This also means that the
Browser SDKs (@sentry/browser
, @sentry/react
, @sentry/vue
, etc.) requires the fetch API to be available in the
environment. If you need to support older browsers, please transpile your code to ES5 using babel or similar and add
required polyfills.
New minimum supported browsers:
startTransaction
export (#11015)unmask
and unblock
(#11049)replaySession
and errorSampleRates
(#11045)spanRecorder
and all related code (#10977)origin
field on span start options (#11058)startSpan
options (#11054)startTransaction
& finishTransaction
hooks (#11008)sentry
field in Next.js config as a means of configuration (#10839)startChild
deprecations (#10956)getRootSpan()
does not rely on transaction (#10979)getSpanDescendants()
everywhere (#10924)transactionName
when route is resolved (#11043)name
parameter (#11057)@sentry/astro
to use OpenTelemetry (#10960)HttpContext
integration class (#10987)scope.transactionName
from root spans (#10991)startIdleSpan
(#10934)__SENTRY__
singleton (#11034)__SENTRY__
(#11074)continueTrace
to be callback-only (#11044)spanToJSON
to handle OTEL spans (#10922)tunnelRoute
option (#10959)setupFastifyErrorHandler
utility (#11061)getRootSpan
functionality (#11004)transactionName
in React Router instrumentations (#11048)unstable_sentryVitePluginOptions
for full Vite plugin customization (#10930)createReduxEnhancer
on server (#11005)handled
value in ErrorBoundary depending on fallback (#10989)addScopeListener
to Scope
interface (#10952)AttachmentType
and use for envelope attachment_type
property (#10946)allowSyntheticDefaultImports
(#11073)startChild
(#11056)scope.transactionName
on pageload and navigation span creation (#10992)startChild()
(#11047)http
& undici
(#11055)Work in this release contributed by @MFoster and @jessezhang91. Thank you for your contributions!
FAQs
Official Sentry SDK for Astro
The npm package @sentry/astro receives a total of 7,363 weekly downloads. As such, @sentry/astro popularity was classified as popular.
We found that @sentry/astro demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.