[go] cmd/trace: listen on localhost when address omitted

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Apr 24, 2026, 3:08:24 PM (18 hours ago) Apr 24
to Michael Pratt, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Carlos Amedee, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Knyszek, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
cmd/trace: listen on localhost when address omitted

Today `-http=:6060` listens on all addresses. Strictly speaking, that is
what `:6060` implies, but most users actually only care to access from
their own machine.

cmd/pprof listens only on localhost when given such an address.
Change cmd/trace to match this behavior since it is a safer default and
makes cmd/trace more consistent with our other tools.

Users that actually want to listen on all addresses can explicitly
include the unspecified address (e.g., `-http=0.0.0.0:6060`).

For #78921.
Change-Id: I47e1fbbdd5374abfeeec10916eb9d2136a6a6964
Reviewed-by: Damien Neil <dn...@google.com>
Auto-Submit: Michael Pratt <mpr...@google.com>
Reviewed-by: Carlos Amedee <car...@golang.org>
Files:
  • M doc/next/3-tools.md
  • M src/cmd/trace/main.go
  • A src/cmd/trace/main_test.go
Change size: M
Delta: 3 files changed, 96 insertions(+), 5 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I47e1fbbdd5374abfeeec10916eb9d2136a6a6964
Gerrit-Change-Number: 770461
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-CC: Michael Knyszek <mkny...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages