Skip to content

Commit 3d81cbe

Browse files
authored
[processor/resourcedetection] Move processor.resourcedetection.hostCPUSteppingAsString feature gate to stable (#35202)
**Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Follows #33076 and #31165. **Link to tracking Issue:** <Issue number if applicable> #31136 **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.> /cc @mx-psi Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
1 parent 8243d20 commit 3d81cbe

File tree

3 files changed

+32
-25
lines changed

3 files changed

+32
-25
lines changed

.chloggen/cpu_stepping_fg_stable.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: breaking
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: resourcedetectionprocessor
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Move `processor.resourcedetection.hostCPUSteppingAsString` feature gate to stable.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [31136]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

processor/resourcedetectionprocessor/internal/system/internal/metadata/resource_int_version.go

-11
This file was deleted.

processor/resourcedetectionprocessor/internal/system/system.go

+5-14
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ var (
3131
featuregate.WithRegisterToVersion("v0.101.0"),
3232
featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/semantic-conventions/issues/495"),
3333
)
34-
hostCPUSteppingAsStringID = "processor.resourcedetection.hostCPUSteppingAsString"
35-
hostCPUSteppingAsStringFeatureGate = featuregate.GlobalRegistry().MustRegister(
36-
hostCPUSteppingAsStringID,
37-
featuregate.StageBeta,
34+
_ = featuregate.GlobalRegistry().MustRegister(
35+
"processor.resourcedetection.hostCPUSteppingAsString",
36+
featuregate.StageStable,
3837
featuregate.WithRegisterDescription("Change type of host.cpu.stepping to string."),
3938
featuregate.WithRegisterFromVersion("v0.95.0"),
39+
featuregate.WithRegisterToVersion("v0.110.0"),
4040
featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/semantic-conventions/issues/664"),
4141
)
4242
)
@@ -215,15 +215,6 @@ func setHostCPUInfo(d *Detector, cpuInfo cpu.InfoStat) {
215215
}
216216

217217
d.rb.SetHostCPUModelName(cpuInfo.ModelName)
218-
if hostCPUSteppingAsStringFeatureGate.IsEnabled() {
219-
d.rb.SetHostCPUStepping(fmt.Sprintf("%d", cpuInfo.Stepping))
220-
} else {
221-
// https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/31136
222-
d.logger.Info("This attribute will change from int to string. Switch now using the feature gate.",
223-
zap.String("attribute", "host.cpu.stepping"),
224-
zap.String("feature gate", hostCPUSteppingAsStringID),
225-
)
226-
d.rb.SetHostCPUSteppingAsInt(int64(cpuInfo.Stepping))
227-
}
218+
d.rb.SetHostCPUStepping(fmt.Sprintf("%d", cpuInfo.Stepping))
228219
d.rb.SetHostCPUCacheL2Size(int64(cpuInfo.CacheSize))
229220
}

0 commit comments

Comments
 (0)