I keep receiving this messages in grafana agent logs, but I don’t know what’s missing to retrieve information.
traces service disco" msg=“unable to find ip in span attributes, skipping attribute addition”
I tried to add the following parameters to Grafana Agent Deployment, is it the right place to add it?
# Get pod ip so that k8sattributes can tag resources
- name: POD_IP
# This is picked up by the resource detector
- name: OTEL_RESOURCE_ATTRIBUTES
So it appears you are trying to enrich your spans with k8s data using the prom service discovery config?
As each span passes through the agent it will attempt to find an IP of the process that created the span. That error message simply means that it failed to find an IP for the given span. Lookup code here:
The easiest way for this to occur is to make sure that the span resource has one of the following attributes:
“Resource” attributes are the same as “Process” attributes. You would see them here in the UI: