The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →For a Next.js app deployed on Vercel, combine Next.js instrumentation with Vercel runtime logs: instrumentation initializes observability integrations and can report request errors, while runtime logs let you search function output by deployment, environment, time, level, status code, and text. Because built-in log retention depends on your plan, export logs through a Log Drain if you need longer history. During an incident, use those logs to guide a rollback, then verify production and validate the fix in a preview deployment.
“Backend log aggregation API” can suggest a single Next.js endpoint that collects and searches all logs. The documentation covered here instead describes an instrumentation convention, Vercel’s runtime-log search and CLI, and Log Drains for longer storage. It does not establish one universal aggregation API or the available drain destinations and their terms.
How Next.js instrumentation fits into backend logging
Next.js instrumentation is the application-side integration point for monitoring and logging tools. The Next.js instrumentation guide, last updated February 27, 2026, says to create instrumentation.ts or instrumentation.js at the project root. If the project uses a src directory, place the file there alongside pages and app.
Export a register function from the file. Next.js calls it when a server instance starts, and it must finish before that instance handles requests. The guide demonstrates initializing OpenTelemetry with @vercel/otel. This is where an app can initialize an observability integration; it is not itself a searchable log store or retention policy.
Recommended Free Tools
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Report request errors through the instrumentation API
The instrumentation API also supports an optional onRequestError export for reporting captured server errors to an observability provider. If the handler performs asynchronous work, await it so the reporting work can complete. This gives an integration a path to receive request-error information; it does not change the retention period of Vercel runtime logs.
What Vercel runtime logs include and how to search them
Vercel runtime logs include output from Vercel Function invocations in preview and production deployments, including console.log output. Vercel describes the log view as real-time and grouped by request. The vercel logs CLI command can narrow results by time range, deployment, branch, environment, level, status code, source, request ID, and full-text message query. It can also emit JSON Lines for downstream processing. The CLI documentation was last updated February 10, 2026.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
For an incident, make the query specific enough to isolate the affected production window and deployment. A request ID can help follow one request; a deployment selector helps separate a newly introduced error from earlier behavior. JSON Lines can feed another processing step, but the available sources do not define a particular downstream schema or aggregation service.
Runtime log limits
Vercel’s Runtime Logs documentation lists these per-request limits: 256 lines, up to 256 KB per line, and up to 1 MB of total log output. When a request exceeds the entry limits, only its most recent logs can be queried. These limits matter when deciding whether runtime logs alone are sufficient for unusually verbose or high-volume diagnostics.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
How long Vercel keeps runtime logs
Vercel’s Runtime Logs plan table gives the following retention periods. The table is specific to runtime log records; it is not a general promise about exported logs or deployment artifacts.
| Vercel plan | Runtime log retention |
|---|---|
| Hobby | 1 hour |
| Pro | 1 day |
| Pro with Observability Plus | 30 days |
| Enterprise | 3 days |
| Enterprise with Observability Plus | 30 days |
Vercel also says Observability Plus users can view up to 14 consecutive days of runtime logs within that 30-day period. The separate Vercel Logs overview describes runtime data as retained for 3 days; for plan-specific periods, use the Runtime Logs table above rather than treating that overview figure as universal.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Keep runtime-log and deployment retention separate
Deployment retention concerns deployment artifacts and recovery, not how long runtime log records remain searchable. Vercel’s Deployment Retention documentation describes a 30-day recovery period for successfully built deployments marked for deletion. That period does not extend runtime log history.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.When to use a Log Drain for longer history
Vercel identifies Log Drains as a way to store logs longer than the built-in runtime-log retention window. Before relying on one, confirm that the destination is available to your project and check the destination’s retention, data location, and other applicable terms. Those details depend on the selected destination and are not specified by the cited Vercel overview.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Choose an export approach with incident diagnosis in mind: preserve deployment identity and useful request context so exported errors can still be compared with a known-good deployment. Also check how the destination handles event size and volume; the runtime-log limits above do not establish the limits or retention behavior of a separate destination.
How to use logs during a production rollback
Vercel’s rollback guide, last updated March 17, 2026, prioritizes restoring service when production is broken. Its rollback mechanism routes production traffic to a prior deployment without rebuilding, and the routing change takes effect within seconds. Rollback is not a guarantee that stateful side effects or external dependencies will be repaired, so treat it as a way to restore a known deployment while investigating the cause.
- Establish impact. Use a bounded time range and production/error filters to determine whether errors are active and which deployment is affected.
- Roll back if service impact warrants it. After the routing change, search production logs again to verify whether the symptoms have stopped; do not assume that a successful rollback command proves recovery.
- Compare deployments. Compare errors from the suspected failing deployment with those from the last known-good deployment, aligning the deployment identity and time range. If the cause is unclear, Vercel’s guide suggests deployment bisection.
- Validate the correction in preview. Deploy the proposed fix to a preview deployment and inspect its logs before shipping it to production.
- Deploy and confirm. After shipping the fix, check production logs to confirm the expected behavior.
Know the rollback scope for your plan
According to Vercel’s rollback guide, Hobby can roll back only to the immediately previous production deployment. Pro and Enterprise can specify an older deployment. Check the target carefully: rollback changes which deployment receives production traffic, but the guide does not claim it reverses database changes, external service actions, or other stateful effects.
Quick Recap
A practical logging setup checklist
- Place the instrumentation file at the project root or in
srcalongsidepagesandapp, and ensureregistercompletes before requests are handled. - Initialize the observability integration you use; the Next.js guide’s OpenTelemetry example uses
@vercel/otel. - If reporting captured request errors with
onRequestError, await asynchronous reporting work. - Use the CLI’s deployment, environment, time, level, status, source, request-ID, and text filters to make incident searches actionable.
- Choose a retention plan based on the history the team needs, and verify actual project eligibility rather than assuming every plan has the same window.
- If built-in retention is too short, verify the Log Drain destination and its own storage terms before depending on it.
- Keep deployment identifiers with exported logs and use preview validation plus post-rollback log checks in the incident process.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

