diff --git a/.chloggen/remove_stable_featuregate.yaml b/.chloggen/remove_stable_featuregate.yaml new file mode 100644 index 0000000000000..22b8ff10b1ba3 --- /dev/null +++ b/.chloggen/remove_stable_featuregate.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: k8sattributesprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove stable feature gate `k8sattr.rfc3339` + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [38810] + +# (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: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# 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/processor/k8sattributesprocessor/internal/kube/client.go b/processor/k8sattributesprocessor/internal/kube/client.go index fffa10d5f985e..7697a48895117 100644 --- a/processor/k8sattributesprocessor/internal/kube/client.go +++ b/processor/k8sattributesprocessor/internal/kube/client.go @@ -13,7 +13,6 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/featuregate" conventions "go.opentelemetry.io/collector/semconv/v1.6.1" "go.uber.org/zap" apps_v1 "k8s.io/api/apps/v1" @@ -30,14 +29,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor/internal/metadata" ) -var enableRFC3339Timestamp = featuregate.GlobalRegistry().MustRegister( - "k8sattr.rfc3339", - featuregate.StageStable, - featuregate.WithRegisterDescription("When enabled, uses RFC3339 format for k8s.pod.start_time value"), - featuregate.WithRegisterFromVersion("v0.82.0"), - featuregate.WithRegisterToVersion("v0.102.0"), -) - // WatchClient is the main interface provided by this package to a kubernetes cluster. type WatchClient struct { m sync.RWMutex @@ -478,14 +469,10 @@ func (c *WatchClient) extractPodAttributes(pod *api_v1.Pod) map[string]string { if c.Rules.StartTime { ts := pod.GetCreationTimestamp() if !ts.IsZero() { - if enableRFC3339Timestamp.IsEnabled() { - if rfc3339ts, err := ts.MarshalText(); err != nil { - c.logger.Error("failed to unmarshal pod creation timestamp", zap.Error(err)) - } else { - tags[tagStartTime] = string(rfc3339ts) - } + if rfc3339ts, err := ts.MarshalText(); err != nil { + c.logger.Error("failed to unmarshal pod creation timestamp", zap.Error(err)) } else { - tags[tagStartTime] = ts.String() + tags[tagStartTime] = string(rfc3339ts) } } }