This PR ensures that the structure of log records generated by the k8sobjects receiver is the same, regardless of the mode (watch or pull) being used. This also solves the issue of the k8s.namespace.name attribute not being set for objects retrieved with watch mode.
Description
This PR ensures that the structure of log records generated by the k8sobjects receiver is the same, regardless of the mode (
watch
orpull
) being used. This also solves the issue of thek8s.namespace.name
attribute not being set for objects retrieved withwatch
mode.Link to tracking issue
Fixes #36352
Testing
Added unit tests and adapted e2e tests