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

Make replication controller metrics consistent with resource attributes #1848

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Jan 29, 2025

Changes

Follow up from #1742 to follow the naming of K8s api for resources. This PR applies the following changes:

k8s.replication_controller.desired_pods -> k8s.replicationcontroller.desired_pods
k8s.replication_controller.available_pods -> k8s.replicationcontroller.available_pods

Merge requirement checklist

@ChrsMark ChrsMark requested review from a team as code owners January 29, 2025 09:19
Signed-off-by: ChrsMark <[email protected]>
@ChrsMark ChrsMark self-assigned this Jan 29, 2025
component: k8s

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Change k8s.replication_controller metrics to k8s.replicationcontroller
Copy link
Member

@trask trask Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I missed the discussion in #1742 (comment)

I feel like this opens a pretty big door across semconv for debating when to apply underscores, because we could point to lots of domain-specific apis that concat words instead of underscoring them

I understand (and agree) with replicaset, statefulset, daemonset, even outside of the k8s domain. could we just make an exception for those (*set things) across all semconv domains?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to me this boils down to #1755 (comment): k8s uses replicationcontroller for everything and we're being consistent with the domain.

Similarly to

- id: bounded_staleness
value: "BoundedStaleness"
stability: development

there is some external source of this value and we pick this external spelling for attributes limited to this use-case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the benefit of doing this for attribute values seems clear to me (e.g. avoids instrumentations having to map domain-specific values to something else)

the benefit to doing this for attribute names is less clear to me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would we approach something like replicaset, statefulset, daemonset vs replication_controller in the future? There are some other examples in #1742 (comment) like cronjob or apiservice where we'd have ambiguity

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also mariadb and cosmosdb could arguably be maria_db and cosmos_db. I'm not suggesting it, I'm saying that I genuinely don't know when and why we apply _

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

3 participants