---
title: "How to Export Traffic and Functions Logs from Netlify"
description: "Create your own Log Drains integration with the general HTTP endpoint, or integrate directly with a provider like Datadog, New Relic, Logflare, or Amazon S3."
source: "https://www.netlify.com/blog/bring-your-own-log-drains-integration/"
last_updated: "2026-07-11T02:44:39.000Z"
---
We’re excited to announce the addition of a new General HTTP Endpoint option for Netlify Log Drains!

Now Netlify developers on Enterprise plans can configure their website’s traffic and function logs to be exported to a general HTTP endpoint. With this option, you can build your own Log Drain integration to any log management provider that supports URL-based authentication and accepts JSON-formatted logs.

As an example, let’s set up a log drain integration to [Logtail from Betterstack](https://betterstack.com/logtail) in order to monitor and troubleshoot Netlify websites using the general HTTP endpoint option.

![image](https://cdn.sanity.io/images/o0o2tn5x/production/ee48b6006067443202e7df63408cae294ae481ea-1999x1508.png?w=450)

As a monitoring solution, Logtail offers:

-   Support for multiple data sources
-   Live log tailing
-   Easy-to-build custom views
-   Custom alerts
-   Powerful notification and monitoring integrations
-   Custom dashboards
-   Direct SQL querying, filtering, and explorations
-   Up to 30 day log retention and available archival integrations

To start your integration, you’ll need [a Logtail account](https://logtail.com/users/sign-up). Once you have this created, follow these steps to configure your Netlify log drain with Logtail:

## Create a Data Source in Logtail

1.  In Logtail, click Connect Source.
2.  Create a name for your source.
3.  From the Platform dropdown, scroll down to and select the HTTP option.
4.  Click Create Source.

![image](https://cdn.sanity.io/images/o0o2tn5x/production/aa930aede1062f1948eb442d36b2f42ead5df882-1999x1510.png?w=450)

## Configure your Log Drain in the Netlify App

1.  Open the Netlify app and select the site for which you’d like to export logs.
2.  Click Site Settings.
3.  Click Log Drains from the left navigation, then click Enable a Log Drain.
4.  Click the Log Drain Service dropdown and select General HTTP Endpoint.
5.  Select the types of logs you want to send to Logtail.

![image](https://cdn.sanity.io/images/o0o2tn5x/production/86c4f59554b385a02df7fa13832cc308c1c2a7c6-1886x1478.png?w=450)

## Construct your Logtail log endpoint URL

1.  From Logtail, copy the URL in “Send the request to” and paste this into a text editor where you will construct your complete URL.
2.  In your text editor, append `?source_token=<SOURCE_TOKEN>` to the URL and replace <SOURCE\_TOKEN> with the token provided on the source screen in Logtail.
3.  In Logtail, click Save Source.
4.  In the Netlify app, paste the full Logtail URL (including the appended source token query parameter) into the Full URL field under your log drain configuration. Click Connect.

You’re all set! You can now click the Live Tail icon in the Logtail UI to start watching for your logs. From there, you can filter, create custom views, create alerts and notifications, and more from these logs in Logtail.

A couple of items of note:

-   When you paste your full URL with the source token into Netlify, the Netlify UI will obfuscate the full URL so that your source token is not exposed; only the base URL will be shown after you hit Save.
-   It may take up to five minutes after log drain configuration for your Netlify logs to start appearing in Logtail.

While it may take a little more work up front to construct the fully-qualified URL for this option, it may enable you to export your Netlify logs even if we don’t offer a direct integration to your preferred log drain provider.

## You should also know…

In addition to the “create your own” option, Netlify also provides direct integrations with the following log management providers:

-   [Datadog](https://www.netlify.com/blog/2021/09/08/announcing-netlify-log-drains-for-datadog/)
-   [New Relic](https://www.netlify.com/blog/netlify-log-drains-new-relic/)
-   [Amazon S3](https://www.netlify.com/blog/export-netlify-logs-to-amazon-s3)
-   Logflare (new!), and
-   More on the way!

## What’s next?

In the coming months, expect to see even more direct integrations for Log Drains. We’re constantly evaluating new integration points based on customer requests.

You can also expect some enhancements to the formatting options available in the General HTTP endpoint log drain configuration. The current log format is limited to JSON only, and we’re exploring the ability to support NDJSON as well for increased compatibility with even more logging providers.

Where will you send your Netlify logs data? [Tell us on the Forums](https://answers.netlify.com/t/create-your-own-log-drains-integration/54520)! Let us know where you’ve configured your integration and if you have any requests for future integrations.

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=Create Your Own Log Drains Integration&url=https://www.netlify.com/blog/bring-your-own-log-drains-integration/)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2Fbring-your-own-log-drains-integration%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/bring-your-own-log-drains-integration/)
-   [Bluesky](https://bsky.app/intent/compose?text=Create Your Own Log Drains Integration+https://www.netlify.com/blog/bring-your-own-log-drains-integration/)

* * *

### Tags

-   [log drains](/blog/tags/log-drains/)
-   [Integrations](/blog/tags/integrations/)

## Keep reading

![](/_astro/104ea93d4cb8d7372e6951329fce7d94dc739067-1200x630_ZxeuX9.webp)

News & Announcements March 30, 2022

[

### Export Netlify Logs to New Relic

](/blog/netlify-log-drains-new-relic)

-   ![Profile picture of Matt Rinehart](/_astro/30d599d9120c3ab044c069ac97d6912176358751-1279x1272_Z15TmXq.webp)
    
    Matt Rinehart
    

![](/_astro/6e218ec8699431138189e47915df4a2ae41248a7-1200x630_Z1vp759.webp)

News & Announcements February 22, 2022

[

### Export Netlify Logs to Amazon S3

](/blog/export-netlify-logs-to-amazon-s3)

-   ![Profile picture of Matt Rinehart](/_astro/30d599d9120c3ab044c069ac97d6912176358751-1279x1272_Z15TmXq.webp)
    
    Matt Rinehart
    

## 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/)