diff --git a/.chloggen/codeboten_stability-metrics.yaml b/.chloggen/codeboten_stability-metrics.yaml new file mode 100644 index 00000000000..162db04adac --- /dev/null +++ b/.chloggen/codeboten_stability-metrics.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: mdatagen + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add stability field to telemetry metrics, allowing the generated description to include a stability string. + +# One or more tracking issues or pull requests related to the change +issues: [11160] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/cmd/mdatagen/internal/loader.go b/cmd/mdatagen/internal/loader.go index e3346f77938..cdc59066f4e 100644 --- a/cmd/mdatagen/internal/loader.go +++ b/cmd/mdatagen/internal/loader.go @@ -104,7 +104,7 @@ type stability struct { } func (s stability) String() string { - if len(s.Level) == 0 || strings.ToLower(s.Level) == strings.ToLower(component.StabilityLevelStable.String()) { + if len(s.Level) == 0 || strings.EqualFold(s.Level, component.StabilityLevelStable.String()) { return "" } if len(s.From) > 0 {