Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

Keep compressed logs of retired tracers in a separate data structure #24

Open
pothos opened this issue Dec 9, 2019 · 2 comments
Open
Labels
good first issue Good for newcomers

Comments

@pothos
Copy link
Member

pothos commented Dec 9, 2019

When the k8s subcommand notices that a container is deleted, it keeps the tracelet for one minute. Directly retire the tracelet without any timeouts after dumping it a final time and store the rendered string compressed in a second list (which has a maximal length, appending if full will push the oldest element out).
If the API functions for dump, close etc can't find an active tracelet, they fall back to the list of compressed dumps. The API function for list should include the list of compressed dumps.

@alban
Copy link
Member

alban commented Dec 9, 2019

SGTM. But I would keep the logs in a structured format (some custom json that we can compress) and only render it to text when the user asks for it. That would leave the possibility of having different presentation format (e.g. with or without timestamps) and the user can decide that format later.

@pothos
Copy link
Member Author

pothos commented Dec 9, 2019

Makes sense, maybe compressing a the binary serialization with protobuf/captnproto/bson or some other marshalling library for Go is even more efficient than just compressing text.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants