Skip to content

Commit

Permalink
Added pod ip in resource attributes (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-mw authored and bhogayatakb committed Dec 5, 2024
1 parent 83c51ef commit a225812
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions processor/k8sattributesprocessor/internal/kube/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ func (c *WatchClient) GetNode(nodeName string) (*Node, bool) {

func (c *WatchClient) extractPodAttributes(pod *api_v1.Pod) map[string]string {
tags := map[string]string{}

tags["k8s.pod.ip"] = pod.Status.PodIP

if c.Rules.PodName {
tags[conventions.AttributeK8SPodName] = pod.Name
}
Expand Down

0 comments on commit a225812

Please sign in to comment.