I was able to add k8s attributes from the below metata https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/a74bfbd9aa2fa5d0abf962899d1a4e0ab8d9f6f4/processor/k8sattributesprocessor/metadata.yaml I can see logs like below
But I do want add service name attributes also, I am planning to add k8s.service.name in k8s attribute processor, how can I do that? And also how can I get k8s.cluster.name and other custom attributes that I want to add ? Does anyone know how to achieve this? Thanks
I tried modifying the opentelemetry contrib code of k8s attribute processor to manually add custom attributes and locally built the code using target: make docker-otelcontribcol , however I do not want to modify the code, wondering if there is way to do it? Thanks
Ramu Mangalarapu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1