We've released the Enterprise CLI for seamless deployments of Next.js projects on the AWS with complete IaC (Terraform) setup. Learn more
Blazity Logo
Development

Observability

Overview of the observability integration available in the next-enterprise project

next-enterprise includes built-in observability powered by OpenTelemetry and integrated through Vercel's official package, giving you insights into your application's performance without complex configuration.

next.config.mjs
instrumentation.ts

What is Observability?

Observability helps you understand your system's internal state through its external outputs. For web applications, this includes:

  • Performance metrics (load times, API responses)
  • Error tracking across frontend and backend
  • User journey analysis
  • Overall system health monitoring

Key Benefits

Effective observability provides several practical advantages:

  • Proactive problem solving - Identify issues before users report them
  • Improved efficiency - Debug with context, reducing resolution time
  • Data-driven decisions - Use real metrics to guide UX and performance improvements
  • Resource optimization - Allocate resources based on actual usage patterns
  • Team alignment - Create shared understanding of system behavior across departments

Implementation Details

next-enterprise uses Vercel's OpenTelemetry integration, configured through the instrumentation.ts file:

import { registerOTel } from "@vercel/otel";
 
export function register() {
  registerOTel("next-app");
}

This provides automatic instrumentation of web vitals, page loads, and server-side traces, with integration into Vercel's dashboard and compatibility with other observability platforms.

Getting Started

The observability features work automatically when deployed to Vercel. During local development:

  1. Performance data appears in browser developer tools
  2. Server-side traces show in terminal logs
  3. Additional exporters can be configured for advanced usage

Best Practices

To maximize value from observability:

  • Add custom traces for critical operations
  • Set up alerts for key performance thresholds
  • Regularly review metrics during development
  • Use insights to guide targeted optimizations

On this page