[receiver/k8scluster] add entity attributes to namespace and container #37581
+659
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add attributes to entities namespace and container emitted by k8scluster receiver.
Add to
k8s.namespace
the attributes -k8s.namespace.phase
- Values can be active, terminating, unknown.k8s.namespace.creation_timestamp
- The creation timestamp of namespace object.Add to container entity the attribute -
container.creation_timestamp
- This is the timestamp the container was started at. The attribute is available when the state of the container is running or terminated (waiting container does not have this attr). Note, for other entities like namespace the creation_timestamp is the time from metadata of the object, whereas for a container this is the StartedAt field from the containerStatus. I am not certain if we want to make this distinction here with a different key, e.g.container.started_at
.Link to tracking issue
Fixes - #37580
Testing
Unit test and e2e test
Documentation
Updated changelog