Files
golang.go/doc/next/4-runtime.md
David Finkel 3694f33692 runtime: GODEBUG=tracebacklabels=1 for 1.27+
https://go.dev/cl/742580 updated the goroutine label format in
tracebacks to only quote the values under some circumstances, and use a
more broadly acceptable format. Flip the GODEBUG=tracebacklabels default
for go 1.27+ modules.

Notably, tracebacklabels is marked as Opaque to avoid some diciness in
maintaining a usage metric in signal handlers, etc. (where mutex
acquisition may be problematic)

Also, update the go 1.27 release notes to call out the new feature.

Updates #76349

Change-Id: Iedd3f6b17d83e99da20365b952a565022d20ff13
Reviewed-on: https://go-review.googlesource.com/c/go/+/751580
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
2026-03-10 20:06:24 -07:00

478 B

Runtime

Tracebacks for modules with go directives configuring Go 1.27 or later will now include runtime/pprof goroutine labels in the header line. This behavior can be disabled with GODEBUG=tracebacklabels=0 (added in Go 1.26). This opt-out is expected to be kept indefinitely in case goroutine labels acquire sensitive information that shouldn't be made available in tracebacks.