-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
New component: k8slog receiver #23339
Comments
@h0cheung I will sponsor this component. A couple comments on the proposal:
|
I generally think this is a good idea but strongly believe we need to depend on the fileconsumer package for tracking and reading log files. It appears this is the intention, but I'd like to understand what if any differences you foresee.
Can you clarify in which ways it is different? Is it only in the way the When reading from files, to what extent should users be able to apply operators? If there is some pre-configured set of operators that handles parsing, would a user be able to change these? Would they be able to place operators before and/or after the pre-defined operators? |
@djaglowski I agree that we should use fileconsumer. I believe this component will pre-configure some operators based on kubernetes requirements. Since this is an opinionated receiver, I don't think those should be configurable (at least not the operators themselves - the proposal is using a different interface to configure how the resource attributes should be set and I like separating this config from the operator itself). Users should be able to add operators after the component's pre-determined manipulation/setup. |
As planned, I will write this component from scratch. Some of the configuration items are the same as filelog, this is to make it easier for users to get started, it does not mean that the same implementation is used. There are several reasons for this:
For efficiency and flexibility, parsing the k8s standard output and splicing containerd logs (based on "T" and "F" tags) will be implemented in separate code. There are no preconfigured operators. |
I strongly disagree with the idea of writing a completely separate implementation for file tracking and ingestion. We should address imperfections in
I recommend we define an interface or function that can be passed to
Similarly, I recommend we define an interface for finding files. We already have a |
I agree with @djaglowski. |
I think interfacing the components in I think we can try to implement asynchronous file reading, optimized fingerprint matching, and optimized log rotation determination in the k8slog receiver's implementation of the fileconsumer interfaces. I'll make changes to the init commit as soon as possible. Let's make this component work together. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
remove stale |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
Looking at the proposed configuration, three questions come to mind.
|
For example, for a docker container, it has the following mount points:
Also, the host root is mounted under /host-root on the otel container. |
What you want to do looks quite complex. I think I'd prefer if we started just with just mode 2, providing a nicer interface and more features over using filelog receiver directly for that use case, and then possibly expand. My general feeling is that philosophically it's a better approach to have a sidecar simply print logs from files inside the container to stdout, and then handle them via the standard Kubernetes logging mechanism, rather then go around that mechanism by digging into container runtime internals. |
Why do we need docker runtime support? It's gone since k8s 1.24 |
There exist some popular cloud providers who offer extended support for K8s versions, one year after upstream EOL to be exact. They still support 1.23 until October 2024. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
Is someone really working on this? do we know when will have a working receiver? |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
The purpose and use-cases of the new component
The existing filelog receiver can find and collect logs in files based on configured path expressions.
However, for k8s containers, we need a special path to access the files in the container. It is not convenient to match the corresponding path directly, and difficult to get its metadata or filter it.
The sidecar solution brings additional problems such as deployment troubles and wasted resources. At present, there is no solution in otel that meets our needs in all aspects.
So we decided to develop a new component: k8slog receiver, to provide full functionality to collect logs in k8s containers. It is an all-in-one solution, which supports to:
If we want to collect logs from k8s, we can use this component.
Example configuration for the component
Telemetry data types supported
logs
Is this a vendor-specific component?
Sponsor (optional)
@TylerHelmuth
Additional context
No response
The text was updated successfully, but these errors were encountered: