-
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
[receiver/kubeletstatsreceiver] prepend container. metrics with k8s. #24238
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This PR introduces `k8s.container*` metrics, which will replace their `container.*` metrics counterparts. For now, the `k8s.container*` metrics are disabled by default. The following process will be followed to phase out the old metrics: - In `v0.82.0`, the new metric is introduced and the old metric is marked as deprecated. Only the old metric are emitted by default. - In `v0.84.0`, the old metric is disabled and the new one enabled by default. - In `v0.86.0` and up, the old metric is removed. Please refer to the following issue: open-telemetry#24238 for the reason for this change.
This wasn't prepended intentionally because it's essentially the same metric about a container (not an orchestration engine). If you have a container in kubernetes, you extract it with kubelet receiver where there is no docker engine anymore. If you run a container with docker (on ECS or somewhere else), you use docker receiver. Resource attributes for the containers will always be different. Not sure what collision users can encounter. Please elaborate. |
Looking at how There are some differences as to how they are computed, as they are not pulled from the same place (container runtime vs kubelet stats) and don't represent the same thing. This doesn't pose an issue if the metric is queried with specific attributes, so that when the metric is being vizualized it only shows values that are pulled from one or the other receiver. That said, I believe having a single metric being pulled from different place can lead to confusion, and having a disctinction between the two allows it to be clearer to the end user as to what the metric they are looking at represents. |
For this point:
You are still able to use the @dmitryax adding on to this, I agree that there are some cases in which it could make sense to have the same metric name across multiple receivers. For example, in this case if there were That being said, in this case, seeing that the I will also open a separate issue for metrics collisions in general. Opened issue: #26499 |
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 Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Component(s)
receiver/kubeletstats
Describe the issue you're reporting
There are currently metric collisions between the
dockerstatsreceiver
andkubeletstatsreceiver
:container.cpu.utilization
[receiver/{dockerstatsreceiver, kubeletstatsreceiver}] Collision with metric container.cpu.utilization #24008container.memory.rss
[receiver/{dockerstatsreceiver, kubeletstatsreceiver}] Collision with metric container.memory.rss #24009And there may arise additional collisions in the future if the metric naming does not differentiate between the two.
This is a proposal to prepend all the
container.*
metrics in thekubeletstatsreceiver
byk8s.
. For example,container.cpu.utilization
will becomek8s.container.cpu.utilization
.All other metrics in the
kubeletstatsreceiver
are already prepended byk8s.
.This could be done in multiple steps (similarly to what was done in #22823). If we take metric
container.cpu.utilization
as an example:k8s.container.cpu.utilization
disabled by default and deprecatecontainer.cpu.utilization
k8s.container.cpu.utilization
enabled by default andcontainer.cpu.utilization
disabled by defaultcontainer.cpu.utilization
The text was updated successfully, but these errors were encountered: