Skip to content

[k8s] add k8s.hpa.scaletargetref resource attributes#2180

Merged
jsuereth merged 5 commits intoopen-telemetry:mainfrom
jinja2:hpa-resource
Jun 6, 2025
Merged

[k8s] add k8s.hpa.scaletargetref resource attributes#2180
jsuereth merged 5 commits intoopen-telemetry:mainfrom
jinja2:hpa-resource

Conversation

@jinja2
Copy link
Copy Markdown
Contributor

@jinja2 jinja2 commented Apr 25, 2025

Fixes #2008

Changes

Please provide a brief description of the changes here.

Intorduces new attributes for the k8s.hpa resource to capture the scaleTargetRef fields.

Merge requirement checklist

@github-actions github-actions Bot added enhancement New feature or request area:k8s labels Apr 25, 2025
@jinja2 jinja2 marked this pull request as ready for review April 25, 2025 04:21
@jinja2 jinja2 requested review from a team as code owners April 25, 2025 04:21
Comment thread model/k8s/registry.yaml Outdated
@lmolkova lmolkova moved this from Untriaged to Needs More Approval in Semantic Conventions Triage Apr 27, 2025
@jinja2 jinja2 changed the title [k8s] add k8s.hpa.scaletarget [k8s] add k8s.hpa.scaletargetref May 12, 2025
atoulme pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request May 14, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Adds new resource attributes to `k8s.hpa`. These attributes track the
target resource a given HPA is configured to scale. The attributes are -
`k8s.hpa.scaletargetref.kind`, `k8s.hpa.scaletargetref.name`, and
`k8s.hpa.scaletargetref.apiversion`. These attributes are disabled by
default.

PR for semantic-conventions is available
[here](open-telemetry/semantic-conventions#2180).

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #38768

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit tests
Tested manually in a k8s cluster

<!--Describe the documentation added.-->
#### Documentation
Documentation updated with new attribute names

<!--Please delete paragraphs that you did not use before submitting.-->
seongpil0948 pushed a commit to seongpil0948/opentelemetry-collector-contrib that referenced this pull request May 16, 2025
)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Adds new resource attributes to `k8s.hpa`. These attributes track the
target resource a given HPA is configured to scale. The attributes are -
`k8s.hpa.scaletargetref.kind`, `k8s.hpa.scaletargetref.name`, and
`k8s.hpa.scaletargetref.apiversion`. These attributes are disabled by
default.

PR for semantic-conventions is available
[here](open-telemetry/semantic-conventions#2180).

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38768

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit tests
Tested manually in a k8s cluster

<!--Describe the documentation added.-->
#### Documentation
Documentation updated with new attribute names

<!--Please delete paragraphs that you did not use before submitting.-->
johnleslie pushed a commit to johnleslie/opentelemetry-collector-contrib that referenced this pull request May 23, 2025
)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Adds new resource attributes to `k8s.hpa`. These attributes track the
target resource a given HPA is configured to scale. The attributes are -
`k8s.hpa.scaletargetref.kind`, `k8s.hpa.scaletargetref.name`, and
`k8s.hpa.scaletargetref.apiversion`. These attributes are disabled by
default.

PR for semantic-conventions is available
[here](open-telemetry/semantic-conventions#2180).

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38768

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit tests
Tested manually in a k8s cluster

<!--Describe the documentation added.-->
#### Documentation
Documentation updated with new attribute names

<!--Please delete paragraphs that you did not use before submitting.-->
johnleslie pushed a commit to johnleslie/opentelemetry-collector-contrib that referenced this pull request May 23, 2025
)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Adds new resource attributes to `k8s.hpa`. These attributes track the
target resource a given HPA is configured to scale. The attributes are -
`k8s.hpa.scaletargetref.kind`, `k8s.hpa.scaletargetref.name`, and
`k8s.hpa.scaletargetref.apiversion`. These attributes are disabled by
default.

PR for semantic-conventions is available
[here](open-telemetry/semantic-conventions#2180).

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38768

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit tests
Tested manually in a k8s cluster

<!--Describe the documentation added.-->
#### Documentation
Documentation updated with new attribute names

<!--Please delete paragraphs that you did not use before submitting.-->
dragonlord93 pushed a commit to dragonlord93/opentelemetry-collector-contrib that referenced this pull request May 23, 2025
)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Adds new resource attributes to `k8s.hpa`. These attributes track the
target resource a given HPA is configured to scale. The attributes are -
`k8s.hpa.scaletargetref.kind`, `k8s.hpa.scaletargetref.name`, and
`k8s.hpa.scaletargetref.apiversion`. These attributes are disabled by
default.

PR for semantic-conventions is available
[here](open-telemetry/semantic-conventions#2180).

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38768

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit tests
Tested manually in a k8s cluster

<!--Describe the documentation added.-->
#### Documentation
Documentation updated with new attribute names

<!--Please delete paragraphs that you did not use before submitting.-->
Comment thread model/k8s/registry.yaml Outdated
@lmolkova lmolkova moved this from Needs More Approval to Ready to be Merged in Semantic Conventions Triage May 29, 2025
@github-project-automation github-project-automation Bot moved this from Ready to be Merged to Needs More Approval in Semantic Conventions Triage Jun 4, 2025
@joaopgrassi joaopgrassi changed the title [k8s] add k8s.hpa.scaletargetref [k8s] add k8s.hpa.scaletargetref resource attributes Jun 4, 2025
@ChrsMark ChrsMark moved this to In Review in K8s SemConv SIG Jun 4, 2025
@ChrsMark ChrsMark requested a review from trask June 6, 2025 07:24
@jsuereth jsuereth added this pull request to the merge queue Jun 6, 2025
Merged via the queue into open-telemetry:main with commit 330aaf5 Jun 6, 2025
15 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in K8s SemConv SIG Jun 6, 2025
thompson-tomo pushed a commit to thompson-tomo/semantic-conventions that referenced this pull request Jun 16, 2025
dd-jasminesun pushed a commit to DataDog/opentelemetry-collector-contrib that referenced this pull request Jun 23, 2025
)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Adds new resource attributes to `k8s.hpa`. These attributes track the
target resource a given HPA is configured to scale. The attributes are -
`k8s.hpa.scaletargetref.kind`, `k8s.hpa.scaletargetref.name`, and
`k8s.hpa.scaletargetref.apiversion`. These attributes are disabled by
default.

PR for semantic-conventions is available
[here](open-telemetry/semantic-conventions#2180).

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38768

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit tests
Tested manually in a k8s cluster

<!--Describe the documentation added.-->
#### Documentation
Documentation updated with new attribute names

<!--Please delete paragraphs that you did not use before submitting.-->
jherbage pushed a commit to jherbage/semantic-conventions that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:k8s enhancement New feature or request

Projects

Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

[k8s/hpa] Add scaletargetref resource attributes to hpa metrics resource attributes

7 participants