Netlify is a web developer platform that makes your applications more performant by pre-rendering static content and decoupling your services. It’s a powerful workflow that improves developer productivity, but you can’t access your traffic logs through the Netlify UI, and your function logs are only available for up to 7 days. That means you need a monitoring tool like New Relic One to store and analyze your data.
Today, we are announcing that you can capture Netlify web traffic and serverless function logs in New Relic by connecting to Netlify Log Drains. With New Relic, you can monitor, visualize, and set alerts based on web traffic and function performance data, allowing you to optimize your Netlify applications and fix issues proactively.
- User traffic monitoring: Identify traffic from bots and bad actors, which can help your security and compliance engineers proactively defend your sites.
- Access and analyze your Netlify traffic logs: Traffic logs are only accessible through log drains, not the Netlify UI. Through New Relic you can analyze things like abnormalities, rate changes, or success rate percentage on your Netlify traffic logs.
- Long-term log retention: For Netlify Enterprise accounts, the Netlify console only provides up to seven days of storage for function logs. With New Relic, you get long-term cold storage for your Netlify log data, and the ability to make month-over-month comparisons.
- User agent analytics: Analyze your user agents for performance issues.
- Session tracking: Gain insight into user activity and journeys across your sites.
Let’s take a more detailed look at how ingesting your Netlify logs in New Relic helps you monitor your Netlify applications.
Why monitor Netlify with New Relic One?
Our built-in log manager automatically parses out key attributes from your logs, which you can then use to search, filter, analyze, and generate metrics. New Relic uses your parsed log data to automatically populate a Netlify dashboard that visualizes key telemetry from your environment, giving you a high-level overview of your Netlify apps.
Once you connect New Relic One to Netlify Log Drains, you’ll be able to do the following:
- Export site traffic and function logs to New Relic to support deep analysis, alerting, and long-term storage.
- Use flexible configuration so you can forward Netlify traffic logs, function logs, or both.
- Use optional tags to organize and filter logs for different sites and environments.
- Set up alerts in New Relic One on your imported Netlify data.
- Visualize your log drain data on a dashboard immediately by installing the Netlify quickstart.
How to set up Netlify Log Drains with New Relic One
To use Netlify Log Drains, your team must be on an Enterprise Netlify Plan.
Follow these steps to configure your site’s log drain for New Relic:
- For your selected site, go to Site settings > Log Drains, and select Enable a log drain.
- Select New Relic as the Log drain service.
- Select the Log type. You can drain your site’s traffic logs, function logs, or both.
- Under Service settings, select the Region that applies to your New Relic account.
- Enter a License API key, also called INGEST-LICENSE, for your New Relic account. Verify that you’re entering your License API key and not your License API key ID or user key.
- Optional: To add a tag for your log drain, go to Tags and enter the key and value. Then select Add tag. Any tags you add become query parameters in log drain requests to New Relic.
Example tags for New Relic:
name of the application or service generating the log events
Get started with New Relic and Netlify
With New Relic and Netlify Log Drains, you can ingest Netlify logs for full visibility into your serverless functions and site traffic. Netlify Log Drains are available to customers on Netlify’s Enterprise plans. To learn more about log management in New Relic One, see Get started with log management.
If you don't already have one, sign up for a free New Relic account now. Your free account includes 100 GB/month of data ingest, one full platform user, and unlimited basic users.
The views expressed on this blog are those of the author and do not necessarily reflect the views of New Relic. Any solutions offered by the author are environment-specific and not part of the commercial solutions or support offered by New Relic. Please join us exclusively at the Explorers Hub (discuss.newrelic.com) for questions and support related to this blog post. This blog may contain links to content on third-party sites. By providing such links, New Relic does not adopt, guarantee, approve or endorse the information, views or products available on such sites.