Skip to content

[detectors/azure] Add AKS detector — port from resourcedetectionprocessor azure/aks #8948

Description

@paulojmdias

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: detectorRelated to a detector packageenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions