-
Notifications
You must be signed in to change notification settings - Fork 276
[k8s] Fix updowncounters to follow the non-pluralization rule #2822
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
1761c7e to
1dc71dc
Compare
1dc71dc to
7a3898b
Compare
f2ec37b to
6b81fd4
Compare
| stability: development | ||
| deprecated: | ||
| reason: renamed | ||
| renamed_to: k8s.replicationcontroller.desired_pods |
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 we maybe add k8s.replicationcontroller.desired_pods as an additional deprecated metric?
(as this is the second time this metric is being renamed)
Otherwise k8s.replicationcontroller.desired_pods wouldn't be mentioned anywhere as a deprecated metric with only the original (from the first rename) name being documented here (i.e. k8s.replication_controller.desired_pods).
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 had both metrics originally, but the validation failed cause it was pointing to a non-existing metric (the first rename). Not sure if this is expected or an unhandled corner-case of our tooling 🤔
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 the tooling expects all the previous metric names to remain around.
Given these are not "stable" I think there's less enforcement around keeping things around, although it is risky depending on whether the intermediate name was used.
If you have a caveat asking folks NOT to migrate to new metrics past version "X" then you can drop the intermediary if it's between "X" and now, as (theoretically) anyone taking a dependency there new this might be changing.
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.
The automation should not allow to remove metric definitions regardless of stability - this helps minimize dependency conflicts in generated semconv artifacts.
The check was updated recently - #2836, I imagine if this PR is rebased and checks re-run, it'd fail requiring metrics to be preserved (as deprecated).
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.
Added that but the validation is failing:
Diagnostic report:
Violation: Metric 'k8s.replication_controller.available_pods' was renamed to 'k8s.replicationcontroller.available_pods', but the new metric does not exist or is deprecated.
- Category : deprecation_violation
- Type : semconv_attribute
- SemConv group : metric.k8s.replication_controller.available_pods
- SemConv attribute:
- Provenance: /home/weaver/source
Violation: Metric 'k8s.replication_controller.desired_pods' was renamed to 'k8s.replicationcontroller.desired_pods', but the new metric does not exist or is deprecated.
- Category : deprecation_violation
- Type : semconv_attribute
- SemConv group : metric.k8s.replication_controller.desired_pods
- SemConv attribute:
- Provenance: /home/weaver/source
@lmolkova could you clarify what's the expectation here? Should we preserve the renames' "history" or just point to the latest existing metric from the deprecated ones?
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.
If I understand correctly:
- metric A was renamed to B
- then metric B was renamed to C
Should deprecation note on A now point to C?
Yes!
If you migrate from old version with metric A, you should migrate directly to C, no need to even know that there was B in the middle.
If someone is looking for migration path to older version of semconv (before C existed), they could find B in that version.
| stability: development | ||
| deprecated: | ||
| reason: renamed | ||
| renamed_to: k8s.replicationcontroller.available_pods |
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.
same as the comment above about adding additional deprecated metric
|
Even after #2306 is resolved, it still unclear why is this change required. Looking at these guidelines it seems like existing naming still valid.
What am I missing? |
|
The PR introduces a significant number of breaking changes, and I’m not sure the current justification is sufficient. |
|
@dmitryax the guidance moves us towards consistency based on the discussions happened in the respective guidance PR and specifically #2317 (comment). The part that applies here is that Also note that those metrics are not in use yet in the Collector in the current format hence it's not really an impactful breaking change. Those metrics are already different to the Collector's ones as we can see in https://github.com/open-telemetry/semantic-conventions/pull/2822/files#diff-ba5fa96c108eca125c2c88f68cdfb0a3d0c95792912f5518eedd55666bc1c033. I don't have a strong preference for this change either but it seems that we need it so as to be consistent with the rest of the project. @lmolkova please chime in if we miss anything here. |
|
Ok, but the guidelines in the spec are still not strong enough for this change. All of the existing metrics seem to follow this section:
Do we need to remove that part from the spec? In general, looking at the changed metrics names as a user, the existing ones seem to be more intuitive than to the new ones. |
| stability: development | ||
| deprecated: | ||
| reason: renamed | ||
| renamed_to: k8s.replicationcontroller.desired_pods |
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 the tooling expects all the previous metric names to remain around.
Given these are not "stable" I think there's less enforcement around keeping things around, although it is risky depending on whether the intermediate name was used.
If you have a caveat asking folks NOT to migrate to new metrics past version "X" then you can drop the intermediary if it's between "X" and now, as (theoretically) anyone taking a dependency there new this might be changing.
|
I will update this based on the outcome of #2822 (comment). |
Signed-off-by: ChrsMark <[email protected]>
Co-authored-by: David Ashpole <[email protected]>
03d620f to
5fb40ce
Compare
Signed-off-by: ChrsMark <[email protected]>
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.
LGTM
|
@open-telemetry/semconv-k8s-approvers please take another look since this PR has been updated. @open-telemetry/specs-semconv-maintainers could you help with the deprecation question from #2822 (comment)? Right now the checks fail because of the "double" deprecation chain, or do I miss anything else there? |
Signed-off-by: ChrsMark <[email protected]>
Fixes #2301
Changes
This brings names in alignment with the pluralisation guidelines: https://github.com/open-telemetry/semantic-conventions/blob/v1.37.0/docs/general/naming.md#do-not-pluralize-updowncounter-names
Renamed metrics:
Merge requirement checklist
[chore]