-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log driver for OpenTelemetry #99
Comments
|
The OpenTelemetry specification for the Logs is currently not available in a stable state. Fortunately, after a brief research, we can note that the implementation is in an active state. For now, in OpenTelemety specification, the Logs already have a stable data-model and OTLP support. There is an open and active discussion about the API. In our opinion, for now, it is better to wait for a stable version before looking for alternative options. |
even getting the logs as a tcp stream from kanto cm would be helpful. right now, we have to statically define filenames and watch individual files, which is really cumbersome with random uuids in the filepaths also, there is no api to get the filename of the logfile. if that would be there, we could at least get the proper filepaths for new containers. |
@mikehaller Isn't that what we did in #98, or I am getting it wrong? |
kant-cm logs is intended for a human user. how would you do that on a production system where you do not even want to install a cli tool? how do you want to monitor 50+ containers? spawning 50 separate cli processes just to get the logs? that sounds like an extreme overhead to me. |
The CLI could be used remotely using the --host flag, so during development it could be used without installing it on the actual device. Also the logs of a container could be fetched directly from the gRPC Logs command without using the CLI. To get the full logfile path of a container, you need the container manager home directory, the container identifier and the logfile name.
By default the logfile is located in <home_dir>/containers/<container_id>(e.g. /var/lib/container-management/containers/1e15be49-b587-47fa-aad7-cad16acd1859). The logfile path could be configured per container during creation - check Logging/root_dir in the doc. Defining a log driver to tcp stream the logs to a remote endpoint is possible. However there are some drawbacks that should be taken in account.
Fetching the logs after an issue is detected would use less traffic and resources. Do you think that this approach is applicable in your usecase? |
Interesting discussion, i like where this is going. So, we have already two high level requirements:
To add:
So, how about always attaching stdout and stderr but piping into a ringbuffer. Then, when remote controller activates streaming of logs, the log stream is sent to a collector endpoint. Collector does compression and filtering and then streams to remote endpoint. You specify a fixed size for the ringbuffer (say 25MB). What do you think about such an approach? |
Currently, the available log driver implementations in container-management are
json-file
andnone
.For the integration of OpenTelemetry, it would be great to have a log driver implementation speaking OLTP and sending container logs to an OpenTelemetry Collector endpoint.
The text was updated successfully, but these errors were encountered: