Open
Description
Component(s)
receiver/k8scluster
Is your feature request related to a problem? Please describe.
The current implementation of the OpenTelemetry Collector provides very limited resource attributes for cronjobs
Describe the solution you'd like
Enhance the resource attributes for cronjobs to include:
k8s.cronjob.concurrency_policy
k8s.cronjob.schedule
k8s.cronjob.suspend
Describe alternatives you've considered
There is this function also that we can extend
func GetMetadata(cj *batchv1.CronJob) map[experimentalmetricmetadata.ResourceID]*metadata.KubernetesMetadata {
rm := metadata.GetGenericMetadata(&cj.ObjectMeta, constants.K8sKindCronJob)
rm.Metadata[cronJobKeySchedule] = cj.Spec.Schedule
rm.Metadata[cronJobKeyConcurrencyPolicy] = string(cj.Spec.ConcurrencyPolicy)
return map[experimentalmetricmetadata.ResourceID]*metadata.KubernetesMetadata{experimentalmetricmetadata.ResourceID(cj.UID): rm}
}
Additional context
No response