TemperStack
Intermediate8 min readUpdated Mar 18, 2026

How to set up observability logging on Vercel

Quick Answer

Set up observability logging on Vercel by enabling the built-in logging features in your project settings and optionally integrating third-party services like Datadog or New Relic. Configure runtime logging in your application code and use Vercel's Analytics dashboard to monitor performance metrics.

Prerequisites

  1. A Vercel account with a deployed project
  2. Access to your project's dashboard
  3. Basic understanding of logging concepts
  4. Node.js application (for runtime logging)
1

Access your Vercel project dashboard

Navigate to vercel.com and sign in to your account. Select your project from the dashboard or click View Project next to the project you want to configure. Once in the project view, click on the Settings tab in the top navigation menu.
Tip
Make sure you have the necessary permissions to modify project settings if you're working in a team environment.
2

Enable Function Logs

In the project settings, scroll down to find the Functions section. Click on Functions in the left sidebar. Toggle on Enable Function Logs to start collecting serverless function execution logs. Set the log retention period according to your needs (options range from 1 day to 30 days depending on your plan).
Tip
Function logs are automatically enabled for Pro and Enterprise plans but may have limits on the Hobby plan.
3

Configure Runtime Logging

Add logging statements to your application code using console.log(), console.error(), or console.warn(). For more structured logging, install a logging library like Winston:

npm install winston

Then implement structured logging in your functions:

import winston from 'winston';

const logger = winston.createLogger({
  level: 'info',
  format: winston.format.json(),
  transports: [new winston.transports.Console()]
});

export default function handler(req, res) {
  logger.info('API request received', { method: req.method, url: req.url });
  // Your function logic
}
Tip
Use structured logging with JSON format for better parsing and filtering in observability tools.
4

Set up Edge Config for Dynamic Logging

Navigate to the Storage tab in your Vercel dashboard and click Create Database. Select Edge Config and create a new config store. Add logging configuration variables like LOG_LEVEL and DEBUG_MODE. Connect this Edge Config to your project by going to Settings > Environment Variables and adding EDGE_CONFIG with your Edge Config URL.
Tip
Edge Config allows you to change logging levels without redeploying your application.
5

Enable Web Analytics and Speed Insights

In your project settings, navigate to Analytics in the left sidebar. Toggle on Web Analytics to track page views, user sessions, and performance metrics. Also enable Speed Insights to monitor Core Web Vitals and performance data. Install the Vercel Analytics package in your project:

npm install @vercel/analytics

Add the Analytics component to your app:

import { Analytics } from '@vercel/analytics/react';

export default function App() {
  return (
    
{/* Your app content */}
); }
Tip
Analytics data appears in the dashboard within 24 hours of enabling the feature.
6

Integrate Third-Party Observability Tools

Go to Settings > Integrations and browse available observability integrations. Click Add next to tools like Datadog, New Relic, or Sentry. Follow the integration setup wizard to connect your accounts and configure log forwarding. Add the required environment variables and API keys as prompted during the integration process.
Tip
Some integrations may require upgrading to a paid Vercel plan to access advanced features.
7

Configure Log Drains (Enterprise)

For Enterprise plans, navigate to Settings > Log Drains. Click Add Log Drain and enter your log destination endpoint (supports HTTP endpoints, Datadog, and other services). Configure the log format (JSON recommended) and select which types of logs to forward (build logs, function logs, static logs). Test the connection and save the configuration.
Tip
Log drains provide real-time log streaming to external services for advanced analysis and alerting.
8

Monitor and Access Logs

View real-time logs by going to your project dashboard and clicking on the Functions tab. Select any deployment to see function execution logs and errors. Access the Analytics dashboard to view performance metrics, user behavior, and Core Web Vitals. Use the search and filtering options to find specific log entries or time periods.
Tip
Set up alerts in your integrated observability tools to get notified of critical errors or performance issues.

Troubleshooting

Function logs are not appearing in the dashboard
Ensure that Function Logs are enabled in your project settings. Check that your functions are actually executing and producing console output. Logs may take a few minutes to appear, and some plans have limited log retention.
Third-party integration is not receiving logs
Verify that all required environment variables and API keys are correctly configured. Check the integration status in Settings > Integrations and look for any error messages. Ensure your third-party service is properly configured to receive webhooks or API calls from Vercel.
Analytics data is missing or incomplete
Confirm that the @vercel/analytics package is installed and the <Analytics /> component is properly added to your application. Check that Web Analytics is enabled in your project settings and that your site has sufficient traffic (data appears with a delay of up to 24 hours).
Log drain connection fails
Verify that your destination endpoint is accessible and accepts the configured log format. Check that any required authentication tokens or API keys are valid. Test the endpoint independently and ensure it can handle the expected log volume from your Vercel deployments.

Related Guides

More Vercel Tutorials

Other Tool Tutorials

Ready to get started with Vercel?

Put this tutorial into practice. Visit Vercel and follow the steps above.

Visit Vercel