tailscale/logtail
Joe Tsai b4ba492701
logtail: require Buffer.Write to not retain the provided slice (#11617)
Buffer.Write has the exact same signature of io.Writer.Write.
The latter requires that implementations to never retain
the provided input buffer, which is an expectation that most
users will have when they see a Write signature.

The current behavior of Buffer.Write where it does retain
the input buffer is a risky precedent to set.
Switch the behavior to match io.Writer.Write.

There are only two implementations of Buffer in existence:
* logtail.memBuffer
* filch.Filch

The former can be fixed by cloning the input to Write.
This will cause an extra allocation in every Write,
but we can fix that will pooling on the caller side
in a follow-up PR.

The latter only passes the input to os.File.Write,
which does respect the io.Writer.Write requirements.

Updates #cleanup
Updates tailscale/corp#18514

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2024-04-08 15:01:07 -07:00
..
backoff logtail: use tstime (#8607) 2023-07-21 13:10:39 -04:00
example all: replace logtail.{Public,Private}ID with logid.{Public,Private}ID (#7404) 2023-02-28 19:00:00 -08:00
filch adjust build tags for tamago 2023-09-06 05:50:18 -07:00
.gitignore Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
api.md all: replace logtail.{Public,Private}ID with logid.{Public,Private}ID (#7404) 2023-02-28 19:00:00 -08:00
buffer.go logtail: require Buffer.Write to not retain the provided slice (#11617) 2024-04-08 15:01:07 -07:00
logtail_test.go tailscale/logtail: redact public ipv6 and ipv4 ip addresses within tailscaled. (#10531) 2023-12-15 15:15:49 -08:00
logtail.go logtail: delete unused code from old way to configure zstd 2024-04-01 20:43:06 -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.