You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/logtail
M. J. Fromberger 95426b79a9
logtail: avoid racing eventbus subscriptions with shutdown (#17695)
In #17639 we moved the subscription into NewLogger to ensure we would not race
subscribing with shutdown of the eventbus client. Doing so fixed that problem,
but exposed another: As we were only servicing events occasionally when waiting
for the network to come up, we could leave the eventbus to stall in cases where
a number of network deltas arrived later and weren't processed.

To address that, let's separate the concerns: As before, we'll Subscribe early
to avoid conflicts with shutdown; but instead of using the subscriber directly
to determine readiness, we'll keep track of the last-known network state in a
selectable condition that the subscriber updates for us.  When we want to wait,
we'll wait on that condition (or until our context ends), ensuring all the
events get processed in a timely manner.

Updates #17638
Updates #15160

Change-Id: I28339a372be4ab24be46e2834a218874c33a0d2d
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
1 month ago
..
example Switch logging service from log.tailscale.io to log.tailscale.com (#14398) 12 months ago
filch all: use Go 1.22 range-over-int 2 years ago
.gitignore Move Linux client & common packages into a public repo. 6 years ago
README.md Move Linux client & common packages into a public repo. 6 years ago
api.md Switch logging service from log.tailscale.io to log.tailscale.com (#14398) 12 months ago
buffer.go feature/logtail: pull logtail + netlog out to modular features 2 months ago
config.go net/netmon: remove usage of direct callbacks from netmon (#17292) 2 months ago
logtail.go logtail: avoid racing eventbus subscriptions with shutdown (#17695) 1 month ago
logtail_omit.go feature/logtail: pull logtail + netlog out to modular features 2 months ago
logtail_test.go net/netmon: remove usage of direct callbacks from netmon (#17292) 2 months ago

README.md

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.