-
Notifications
You must be signed in to change notification settings - Fork 237
[k8s] add k8s.hpa.scaletargetref #2180
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
base: main
Are you sure you want to change the base?
Conversation
model/k8s/registry.yaml
Outdated
@@ -205,6 +205,30 @@ groups: | |||
brief: > | |||
The name of the horizontal pod autoscaler. | |||
examples: ['opentelemetry'] | |||
- id: k8s.hpa.scaletarget.kind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason for scaletarget
instead of scale_target
? thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since scaletarget
is just a field and not a K8s resource that we'd use with kubectl get <resource>
I guess it can also be scale_target
.
Is there any documented guidance that would help us from similar discussions in the future? If so, we should also ensure that the K8s resource exception is also covered there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this what you're looking for? https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/naming.md
For each multi-word dot-delimited component of the name separate the words by underscores (i.e. use snake_case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we chose the one word form for consistency with other k8s naming patterns like daemonset
statefulset
which essentially result of k8s being written in Go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@open-telemetry/semconv-k8s-approvers it would be great to document / agree on this: #2245
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a PR here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I update this to keep the attr name same as the full field name (k8s.hpa.scaletargetref.*
) ? I dropped the Ref
bit from the field name scaleTargetRef
but think i should keep it consistent with k8s field
<!--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.-->
) <!--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.-->
) <!--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.-->
) <!--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.-->
) <!--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.-->
Fixes #2008
Changes
Please provide a brief description of the changes here.
Intorduces new attributes for the
k8s.hpa
resource to capture thescaleTargetRef
fields.Merge requirement checklist
[chore]