Apm agent lost some kubernetes metadata

cluster: 7.15.2,7.17.3
apm dotnet agent

According to the documentation, apm agent can automatically capture kubernetes-related metadata. Why can only kubernetes.pod.name and kubernetes.pod.uid be captured?

I specifically increased the processor but it didn't make any difference.

processors:
  - add_kubernetes_metadata:
      default_indexers.enabled: false
      default_matchers.enabled: false

      add_resource_metadata:
        namespace:
          include_labels: [","]
        deployment: false
        cronjob: false

In addition, according to the forum search, I found kubernetes-data, but I didn't understand, I need to add to each pod Kubernetes Downward API environment variable?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Hi @wajika,

which other kubernetes metadata would you like to collect? Typically we collect what makes sense and is useful and it's not a huge overhead to collect.

In addition, according to the forum search, I found kubernetes-data, but I didn't understand, I need to add to each pod Kubernetes Downward API environment variable?

The way this technically works in the .NET agent is that the agent looks for environment variables like KUBERNETES_NAMESPACE, KUBERNETES_POD_NAME, etc. I'm not a kubernetes expert, but from what I know those environment variables are not present by default, unless you set those with the Downward API. So the answer is: if the environment variables are present, then you are good to go. If they aren't present by default, then probably you'll need to set those.