Files
tailscale/tsconst/tsconst.go
Brad Fitzpatrick bc5a7da03d control/controlclient: log control-plane request ID when slow or failing
The control plane sends an X-Tailscale-Request-Id response header for
debugging. It's not part of the Tailscale protocol, but if it's present,
log it when something goes wrong so client logs can be correlated with
server-side logs: when the server returns an error reply (non-200 status
or a RegisterResponse error), when response headers are slow to arrive
(over five seconds), when the server hangs before sending a
RegisterResponse or its first MapResponse, or when the map long-poll
watchdog fires.

Move the header name constant to tsconst so the client doesn't need to
depend on tsweb.

Updates tailscale/corp#46147

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I35e179aa335ce4cbe1ab5c7c54d0682ff7975425
2026-08-05 12:08:56 +00:00

23 lines
975 B
Go

// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
// Package tsconst exports some constants used elsewhere in the
// codebase.
package tsconst
// WintunInterfaceDesc is the description attached to Tailscale
// interfaces on Windows. This is set by the WinTun driver.
const WintunInterfaceDesc = "Tailscale Tunnel"
const WintunInterfaceDesc0_14 = "Wintun Userspace Tunnel"
// TailnetLockNotTrustedMsg is the error message used by tailnet lock
// and sniffed (via substring) out of an error sent over the network.
const TailnetLockNotTrustedMsg = "this node is not trusted by Tailnet Lock"
// RequestIDHeader is the name of the HTTP header that Tailscale
// servers (including the control plane) use to report an opaque
// request ID for debugging. It is not part of the Tailscale protocol;
// clients may log its value, if present, to correlate their requests
// with server-side logs.
const RequestIDHeader = "X-Tailscale-Request-Id"