Problem Statement
collector-contrib/processor/resourcedetectionprocessor/internal/azure/aks implements an AKS resource detector that detects when the process is running on Azure Kubernetes Service. There is currently no equivalent in go-contrib/detectors/azure/, which means AKS detection is only available to collector-contrib pipelines and not to any Go SDK user.
Proposed Solution
Add a new detectors/azure/aks (or extend detectors/azure/) package implementing the AKS detector as a resource.Detector, ported from the collector-contrib implementation, so that collector-contrib/processor/resourcedetectionprocessor can delegate to it and any other Go SDK user can adopt it.
Prior Art
Additional Context
What the collector-contrib detector does:
- Checks for the
KUBERNETES_SERVICE_HOST environment variable to confirm it is running on Kubernetes.
- Calls the Azure Instance Metadata Service to confirm it is running in Azure.
- Parses the resource group name to extract the AKS cluster name.
- Emits:
cloud.provider (azure), cloud.platform (azure_aks), k8s.cluster.name.
Problem Statement
collector-contrib/processor/resourcedetectionprocessor/internal/azure/aksimplements an AKS resource detector that detects when the process is running on Azure Kubernetes Service. There is currently no equivalent ingo-contrib/detectors/azure/, which means AKS detection is only available to collector-contrib pipelines and not to any Go SDK user.Proposed Solution
Add a new
detectors/azure/aks(or extenddetectors/azure/) package implementing the AKS detector as aresource.Detector, ported from the collector-contrib implementation, so thatcollector-contrib/processor/resourcedetectionprocessorcan delegate to it and any other Go SDK user can adopt it.Prior Art
processor/resourcedetectionprocessor/internal/azure/aksdetectors/azure/Additional Context
What the collector-contrib detector does:
KUBERNETES_SERVICE_HOSTenvironment variable to confirm it is running on Kubernetes.cloud.provider(azure),cloud.platform(azure_aks),k8s.cluster.name.