> The Sentry Build plugin is now archived. To integrate Sentry with Netlify Functions we recommend following Sanity’s [AWS Lambda documentation](https://docs.sentry.io/platforms/javascript/guides/aws-lambda/). If you have any questions, reach out in our [support forums](https://answers.netlify.com/).

The [Sentry Build Plugin](https://github.com/getsentry/sentry-netlify-build-plugin/) for Netlify was initially developed to provide users with improved error monitoring and management capabilities. Specifically, it was designed to work with Netlify’s build and deploy pipeline, allowing developers to easily monitor their application’s performance, quickly identify, and resolve any issues that occur. This means that users can receive real-time notifications of any issues that occur during the build process, such as syntax errors, broken links, and other issues.

However, based on feedback from all of you, you voiced that the plugin wasn’t providing adequate visibility around functions usage and spike patterns..

You asked, we listened. We’re proud to announce the newest integration with Sentry—designed to address this specific limitation and enable users to add Sentry error monitoring to [Netlify Functions](https://docs.netlify.com/functions/overview/), [Scheduled Functions](https://docs.netlify.com/functions/scheduled-functions/), and [Background Functions](https://docs.netlify.com/functions/background-functions/). Good news; this integration also includes minimal configuration for Sentry Cron Monitoring on Scheduled Functions and centralizes all errors in the Sentry project to help users debug them more efficiently.

As developers continue to build increasingly complex sites and apps, using serverless functions to execute tasks on a recurring basis or perform long-running tasks becomes more commonplace. This latest integration between Netlify and Sentry provides developers with the efficiency and visibility they need to ensure that their sites and apps are up and running smoothly.

## Before you begin

To get started with the Sentry Integration on Netlify, you’ll need:

1.  A Sentry [account](https://sentry.io/signup/) and [project](https://docs.sentry.io/product/projects/).
2.  A Netlify site on which you want to enable the integration.

## Create a function that uses error monitoring

With the Sentry Integration, you can add error monitoring to your Netlify Functions. To get started and enable the integration, install the necessary dependencies to your project:

```
npm install @netlify/sentry @netlify/integrations
```

Sentry automatically assigns a [Data Source Name (DSN)](https://docs.sentry.io/product/sentry-basics/dsn-explainer/) when you create a project to start monitoring events in your app. Create an environment variable on your Netlify site to store the DSN assigned to your Sentry project:

1.  In your Sentry account, select **Settings > Projects**, then the project you want to associate with your Netlify site.
2.  Under **SDK Setup**, select **Client Keys (DSN)** to access your DSN.
3.  Copy the DSN value from the list of client keys.

![image](https://cdn.sanity.io/images/o0o2tn5x/production/3d04fb14430ca25a716a10c7db046afb82f5870d-2558x1252.png?w=1500)

Return to the Netlify UI to enable the Sentry Integration:

1.  Select your site, then select **Integrations > Sentry > Enable**.
2.  Under **Function monitoring > Function monitoring configuration**, select **Edit settings**.
3.  Paste the DSN from Sentry into the value field.
4.  Select **Save**.

After the Sentry Integration is enabled and your Sentry DSN is configured, you can [create a function](https://docs.netlify.com/functions/build/?fn-language=ts#app) with a `handler` method. Add the Sentry wrapper around the function like in the following example:

```
import { wrap } from "@netlify/integrations";import { HandlerEvent, HandlerContext } from "@netlify/functions";import { SentryContext, withSentry } from "@netlify/sentry";
const withIntegrations = wrap(withSentry);
const handler = withIntegrations(  async (event: HandlerEvent, context: HandlerContext & SentryContext) => {    // Add handler function content here  });
export { handler };
```

Here are additional examples to test your [functions](https://docs.netlify.com/netlify-labs/experimental-features/sentry-integration/?_gl=1%2a1ubk7v4%2a_gcl_aw%2aR0NMLjE2NzM1NjMzOTAuQ2owS0NRaUFfUDZkQmhEMUFSSXNBQUdJN0hEaFoxOVVsNWFzUkI5RWhzNTNJVy1VYmt0NG01ZWpRMmhobkNwd2F2RGV4WjlVZDN0Nm82OGFBdEthRUFMd193Y0I.&_ga=2.249834246.1221322282.1676995244-636492925.1666386985&_gac=1.258889208.1673563390.Cj0KCQiA_P6dBhD1ARIsAAGI7HDhZ19Ul5asRB9Ehs53IW-Ubkt4m5ejQ2hhnCpwavDexZ9Ud3t6o68aAtKaEALw_wcB#basic-errors), [scheduled functions](https://docs.netlify.com/netlify-labs/experimental-features/sentry-integration/?_gl=1%2a1ubk7v4%2a_gcl_aw%2aR0NMLjE2NzM1NjMzOTAuQ2owS0NRaUFfUDZkQmhEMUFSSXNBQUdJN0hEaFoxOVVsNWFzUkI5RWhzNTNJVy1VYmt0NG01ZWpRMmhobkNwd2F2RGV4WjlVZDN0Nm82OGFBdEthRUFMd193Y0I.&_ga=2.249834246.1221322282.1676995244-636492925.1666386985&_gac=1.258889208.1673563390.Cj0KCQiA_P6dBhD1ARIsAAGI7HDhZ19Ul5asRB9Ehs53IW-Ubkt4m5ejQ2hhnCpwavDexZ9Ud3t6o68aAtKaEALw_wcB#scheduled-function-errors), and [background functions](https://docs.netlify.com/netlify-labs/experimental-features/sentry-integration/?_gl=1%2a1ubk7v4%2a_gcl_aw%2aR0NMLjE2NzM1NjMzOTAuQ2owS0NRaUFfUDZkQmhEMUFSSXNBQUdJN0hEaFoxOVVsNWFzUkI5RWhzNTNJVy1VYmt0NG01ZWpRMmhobkNwd2F2RGV4WjlVZDN0Nm82OGFBdEthRUFMd193Y0I.&_ga=2.249834246.1221322282.1676995244-636492925.1666386985&_gac=1.258889208.1673563390.Cj0KCQiA_P6dBhD1ARIsAAGI7HDhZ19Ul5asRB9Ehs53IW-Ubkt4m5ejQ2hhnCpwavDexZ9Ud3t6o68aAtKaEALw_wcB#background-function-errors).

For more information on creating functions that use cron monitoring and identifying basic errors, be sure to refer to our [Sentry Integration docs page](https://docs.netlify.com/netlify-labs/experimental-features/sentry-integration/).

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=New Netlify-Sentry Integration for Improved Error Monitoring for Functions&url=https://www.netlify.com/blog/sentry-integration/)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2Fsentry-integration%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/sentry-integration/)
-   [Bluesky](https://bsky.app/intent/compose?text=New Netlify-Sentry Integration for Improved Error Monitoring for Functions+https://www.netlify.com/blog/sentry-integration/)

* * *

### Tags

-   [changelog](/blog/tags/changelog/)
-   [sentry](/blog/tags/sentry/)

## Keep reading

![](/_astro/eb275ddb9290b947ba4c53ac30538c77b44edae9-720x405_1y2MXK.webp)

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

![](/_astro/d20f9f717bbdd511f73ee138be4114ff13f480f9-2400x1350_1fe4aq.webp)

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

## Recent posts

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)