Skip to content

feat(resource-detector-azure): Add AKS Resource Detector#3371

Open
JacksonWeber wants to merge 2 commits intoopen-telemetry:mainfrom
JacksonWeber:jacksonweber/add-aks-resource-detector
Open

feat(resource-detector-azure): Add AKS Resource Detector#3371
JacksonWeber wants to merge 2 commits intoopen-telemetry:mainfrom
JacksonWeber:jacksonweber/add-aks-resource-detector

Conversation

@JacksonWeber
Copy link
Contributor

Short description of the changes

This pull request adds support for detecting Azure Kubernetes Service (AKS) environments in the @opentelemetry/resource-detector-azure package. It introduces a new resource detector for AKS clusters, enabling automatic extraction of cluster metadata such as cluster name and resource ID, and updates documentation and semantic conventions accordingly. The changes also include comprehensive tests for the new detector.

AKS Resource Detection:

  • Added AzureAksDetector in src/detectors/AzureAksDetector.ts, which detects AKS cluster metadata from the environment or a mounted ConfigMap file, and exposes the attributes cloud.provider, cloud.platform, cloud.resource_id, and k8s.cluster.name.
  • Exported the new azureAksDetector from src/detectors/index.ts and src/index.ts for public use. [1] [2]

Semantic Convention Updates:

  • Added the experimental attribute k8s.cluster.name and enum value azure.aks for cloud.platform in src/semconv.ts. [1] [2]
  • Defined constants and helper functions for AKS metadata extraction in src/types.ts, including parsing cluster name from ARM resource IDs.

Documentation and Testing:

  • Updated README.md with AKS detector usage instructions, attribute descriptions, and configuration examples.
  • Added unit tests for AKS detection logic in test/detectors/AzureAksDetector.test.ts, covering environment variable and file-based detection, and edge cases.

@JacksonWeber JacksonWeber requested a review from a team as a code owner February 5, 2026 04:24
@github-actions github-actions bot requested a review from hectorhdzg February 5, 2026 04:25
@JacksonWeber JacksonWeber changed the title feat(resource-detector-azure) Add AKS Resource Detector feat(resource-detector-azure): Add AKS Resource Detector Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants