feat(resource-detector-azure): Add AKS Resource Detector#3371
Open
JacksonWeber wants to merge 2 commits intoopen-telemetry:mainfrom
Open
feat(resource-detector-azure): Add AKS Resource Detector#3371JacksonWeber wants to merge 2 commits intoopen-telemetry:mainfrom
JacksonWeber wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description of the changes
This pull request adds support for detecting Azure Kubernetes Service (AKS) environments in the
@opentelemetry/resource-detector-azurepackage. 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:
AzureAksDetectorinsrc/detectors/AzureAksDetector.ts, which detects AKS cluster metadata from the environment or a mounted ConfigMap file, and exposes the attributescloud.provider,cloud.platform,cloud.resource_id, andk8s.cluster.name.azureAksDetectorfromsrc/detectors/index.tsandsrc/index.tsfor public use. [1] [2]Semantic Convention Updates:
k8s.cluster.nameand enum valueazure.aksforcloud.platforminsrc/semconv.ts. [1] [2]src/types.ts, including parsing cluster name from ARM resource IDs.Documentation and Testing:
README.mdwith AKS detector usage instructions, attribute descriptions, and configuration examples.test/detectors/AzureAksDetector.test.ts, covering environment variable and file-based detection, and edge cases.