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 seven days. That means you need a monitoring tool like New Relic to store and analyze your data.
Capture and analyze Netlify logs with New Relic
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 analysis of 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.
To see how ingesting Netlify logs in New Relic helps you monitor your Netlify applications, you can watch this video.
Why monitor Netlify with New Relic?
While using Netlify sites provides many benefits, log management is still essential and often challenging. New Relic provides a built-in log manager that 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 to Netlify Log Drains, you can take advantage of the following benefits:
- Export site traffic and function logs to New Relic to support deep analysis, alerting, and long-term storage.
- Use flexible configuration to forward Netlify traffic logs and function logs.
- Use optional tags to organize and filter logs for different sites and environments.
- Set up alerts in New Relic on your imported Netlify data.
How to set up Netlify Log Drains with New Relic
To use Netlify Log Drains, your team must be on an Netlify Enterprise 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 , 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.
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, see Get started with log management.
If you don't already have one, sign up for a free New Relic account. Your free account includes 100 GB/month of data ingest, one full platform user, and unlimited basic users.
Las opiniones expresadas en este blog son las del autor y no reflejan necesariamente las opiniones de New Relic. Todas las soluciones ofrecidas por el autor son específicas del entorno y no forman parte de las soluciones comerciales o el soporte ofrecido por New Relic. Únase a nosotros exclusivamente en Explorers Hub ( discus.newrelic.com ) para preguntas y asistencia relacionada con esta publicación de blog. Este blog puede contener enlaces a contenido de sitios de terceros. Al proporcionar dichos enlaces, New Relic no adopta, garantiza, aprueba ni respalda la información, las vistas o los productos disponibles en dichos sitios.