Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[processor/resourcedetection] Add k8s cluster name detection in EKS environment #28649

Merged
merged 11 commits into from
Nov 21, 2023

Conversation

crobert-1
Copy link
Member

Description:

This enhancement detects the k8s cluster name in EKS. The solution uses EC2 instance tags to determine the cluster name, which means it will only work on EC2 (as noted in documentation updates).

Note: This is the second attempt at adding this functionality, superseding PR #27408. My first attempt was using v2 of the AWS GO SDK, but the service/ec2 module was causing lint to hit OOM issues and successful lint runs were taking over half an hour to complete. This uses v1 of the module instead in an attempt to resolve linting issues.

Link to tracking Issue:
Resolves #26794

Testing:
Manual testing in an EKS cluster when running on EC2 instances. Added unit tests to cover basic functionality.

Documentation:
Updated README and relevant metadata

Use ec2 instance tags to determine the EKS k8s cluster
name.
@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Oct 26, 2023
@crobert-1 crobert-1 marked this pull request as ready for review October 26, 2023 23:12
@crobert-1 crobert-1 requested a review from a team October 26, 2023 23:12
@crobert-1 crobert-1 changed the title Add k8s cluster name detection in EKS environment [processor/resourcedetection] Add k8s cluster name detection in EKS environment Oct 26, 2023
- Don't panic on error
- Remove unrelated changes
- Reuse conventions variable for k8s cluster name
@crobert-1 crobert-1 added the enhancement New feature or request label Oct 27, 2023
@crobert-1
Copy link
Member Author

check-links failure will be fixed by #28669

@dmitryax
Copy link
Member

@jinja2 can you please take a look as well?

@crobert-1
Copy link
Member Author

Lint failure unrelated (fixed by #29101), signalfx exporter test failure is also unrelated (added frequency to #29099)

@dmitryax dmitryax merged commit 60430e1 into open-telemetry:main Nov 21, 2023
83 checks passed
@github-actions github-actions bot added this to the next release milestone Nov 21, 2023
RoryCrispin pushed a commit to ClickHouse/opentelemetry-collector-contrib that referenced this pull request Nov 24, 2023
…nvironment (open-telemetry#28649)

**Description:** 
This enhancement detects the k8s cluster name in EKS. The solution uses
EC2 instance tags to determine the cluster name, which means it will
only work on EC2 (as noted in documentation updates).

Resolves open-telemetry#26794

---------

Co-authored-by: bryan-aguilar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request processor/resourcedetection Resource detection processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[processor/resourcedetection]: Add support for k8s.cluster.name where possible
4 participants