# Astro Error and Performance Monitoring

> Get started identifying & resolving performance issues with Astro error & performance monitoring. Learn how to get started for free with Sentry here.

**URL:** https://sentry.io/for/astro/

---

Actionable insights to resolve Astro performance bottlenecks and errors. Improve your monitoring workflow with a full view of releases so you can mark Astro errors as resolved and prioritize live issues.

**Documentation:** [https://docs.sentry.io/platforms/javascript/guides/astro/](https://docs.sentry.io/platforms/javascript/guides/astro/)

## Install

Just run this command to install and register Sentry's Astro integration:

```bash
npx astro add @sentry/astro
```

Add your project config to your `astro.config.mjs` file to upload source maps:

```javascript
import { defineConfig } from "astro/config";
import sentry from "@sentry/astro";

export default defineConfig({
  integrations: [
    sentry({
      org: "your-org-slug",
      project: "your-project-slug",
      authToken: process.env.SENTRY_AUTH_TOKEN,
    }),
  ],
});
```

Then initialize Sentry on the client in `sentry.client.config.js`:

```javascript
import * as Sentry from "@sentry/astro";

Sentry.init({
  dsn: "https://<key>@sentry.io/<project>",
  integrations: [Sentry.browserTracingIntegration()],
  tracesSampleRate: 1.0,
});
```

See the [Astro docs](https://docs.sentry.io/platforms/javascript/guides/astro/) for full setup options.

## Features

### Works With OpenTelemetry

Sentry traces your app out of the box, with rich distributed tracing context across the libraries and frameworks you use. Already running OpenTelemetry? Sentry runs alongside your existing setup without taking it over, and can capture spans from `@opentelemetry/api` when you turn it on.

### Astro Performance Monitoring

Quickly identify performance issues with [Tracing](/product/tracing/) and view the full end-to-end distributed trace to see the exact poor-performing API call and surface any related Astro errors. Improve Astro performance with max efficiency, not max effort.

### Astro Error Monitoring With Complete Stack Traces

See the error and Astro stack trace previously only visible in your user's debug console. Apply source maps automatically to convert minified, compiled, or transpiled code back to its original form. Keep your Astro source maps private by uploading them directly to Sentry.

### Fill In The Blanks About Astro Errors

See what the app was doing when the Astro error occurred: user interactions, AJAX requests, console log messages, and more. Learn in which version a bug first appeared, merge duplicates, and know if things regress in a future release.

---

*Source: [sentry.io/for/astro/](https://sentry.io/for/astro/)*
