tailscale/logtail
Brad Fitzpatrick 1e68a11721 logtail: run HTTP tests in-memory with memnet + synctest
TestEncodeAndUploadMessages waited on the default 2s FlushDelay,
making the logtail package the slowest non-integration test in
the tree (~2s real time). Switch the shared harness from an
httptest.Server-on-loopback to a memnet.Listener-backed *http.Server
and run the tests inside synctest.Test, so fake time advances the
flush timer instantly.

Drops the net/http/httptest dependency from these tests. Combined
with the TestMain non-localhost dial guard added in the previous
commit, no test in this package can accidentally reach the real
log.tailscale.com server. Whole package now runs in ~7ms.

Updates tailscale/corp#28679

Change-Id: Ie0e7a6a79641384ed0eecb99d767e17cda8bb944
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-04-20 13:33:10 -07:00
..
example all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
filch logtail/filch: fix filch test panic (#18660) 2026-02-10 13:24:00 -08:00
.gitignore Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
api.md Switch logging service from log.tailscale.io to log.tailscale.com (#14398) 2024-12-16 14:53:34 -08:00
buffer.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
config.go logtail: add Config.Disabled to suppress the startup banner 2026-04-20 13:33:10 -07:00
logtail_omit.go logtail: add Logger.SetEnabled to toggle uploads at runtime 2026-04-17 12:19:39 -07:00
logtail_test.go logtail: run HTTP tests in-memory with memnet + synctest 2026-04-20 13:33:10 -07:00
logtail.go logtail: add Config.Disabled to suppress the startup banner 2026-04-20 13:33:10 -07:00
README.md Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00

Tailscale Logs Service

This github repository contains libraries, documentation, and examples for working with the public API of the tailscale logs service.

For a very quick introduction to the core features, read the API docs and peruse the logs reprocessing example.

For more information, write to info@tailscale.io.