Open axw opened 2 years ago
When running instrumented applications within a Kuberentes environment, our agents will extract a limited amount of Kubernetes pod/node metadata from cgroup info: https://github.com/elastic/apm/blob/main/specs/agents/metadata.md#containerkubernetes-metadata
It may be useful to enrich this information with additional details that can only be obtained by communicating with the Kubernetes API Server, e.g. the Kubernetes service name, and labels/annotations.
Things to research:
Another thing to consider would be to use a mutating admission controller to inject KUBERNETES_* environment variables. This could be a custom webhook, or it could be a published Kyverno mutate policy.
KUBERNETES_*
When running instrumented applications within a Kuberentes environment, our agents will extract a limited amount of Kubernetes pod/node metadata from cgroup info: https://github.com/elastic/apm/blob/main/specs/agents/metadata.md#containerkubernetes-metadata
It may be useful to enrich this information with additional details that can only be obtained by communicating with the Kubernetes API Server, e.g. the Kubernetes service name, and labels/annotations.
Things to research: