WwwspillDocsProgramming
Related
How to Shape Go's Future: A Complete Guide to the 2025 Developer SurveyHow GDB's Source-Tracking Breakpoints Save Your Debugging SanityGo Developer Survey 2025: Help Shape the Future of Go5 Ways AI Assistants Are Redefining Cybersecurity ThreatsPython 3.15.0 Alpha 6: What's New and Why It MattersBroker Order API Goes Live: Kafka and RabbitMQ Power Real-Time Trade Execution in New Trading SystemAssessing Arm64 Compatibility of Hugging Face Spaces with Docker and Arm MCP ToolsPython 3.15.0 Alpha 3 Released: A Developer Preview of Upcoming Features

Go 1.25 Introduces Flight Recorder for Real-Time Debugging of Long-Running Services

Last updated: 2026-05-01 20:55:46 · Programming

Breaking: Go 1.25 Flight Recorder Now Available

September 26, 2025 — The Go team today announced the immediate availability of a flight recorder in Go 1.25, a new diagnostic tool designed to capture execution traces just before a failure occurs in long-running applications.

Go 1.25 Introduces Flight Recorder for Real-Time Debugging of Long-Running Services
Source: blog.golang.org

The flight recorder maintains a continuous buffer of the last few seconds of execution, allowing developers to snapshot the precise moment a problem is detected. This approach avoids the overhead of storing full traces on live servers.

“The flight recorder is like a scalpel cutting directly to the problem area,” said Carlos Amedee, Go team engineer at Google. “Instead of digging through hours of traces, you grab the exact window where something went wrong.”

Background

Go’s execution traces have been available since the runtime/trace package was introduced, but collecting them in production required pre-planned start/stop calls. For web services running days or weeks, this was impractical — problems often surfaced long after the relevant trace window had passed.

Previous workarounds included random sampling across fleets, but that demanded heavy infrastructure and still missed many issues. The flight recorder solves this by storing a rolling buffer in memory, ready for on-demand retrieval.

How It Works

Developers enable the flight recorder at process start using runtime/trace.Start with a FlightRecorder option. It continuously writes trace events into a ring buffer. At any point, the code can call a snapshot function to dump the buffer to a file or network endpoint.

The snapshot includes events from just before the failure, such as goroutine scheduling, garbage collection pauses, and network I/O delays. The size of the buffer (typically 5–10 seconds) is configurable.

Go 1.25 Introduces Flight Recorder for Real-Time Debugging of Long-Running Services
Source: blog.golang.org

“This is a huge step for debugging latency issues in services that are supposed to be always on,” said Michael Knyszek, co-author of the feature. “You no longer need to predict when a problem will occur.”

What This Means

For SREs and backend engineers, the flight recorder reduces mean time to resolution (MTTR) for transient failures. Instead of adding more logging or instrumenting custom on-off switches, they can rely on a built-in, zero-configuration solution.

The feature also improves observability for cloud-native applications where restarting a pod to capture a trace is not feasible. Combined with Go’s pprof and trace visualization tools, it forms a complete post-mortem toolkit.

Future Outlook

The Go team plans to extend the flight recorder to support custom events and integration with distributed tracing systems. The current version is available in Go 1.25, which ships today.

Recommended reading: 2024 execution traces preview and the setup guide in the official docs.