Skip to content

Commit 16d362f

Browse files
committed
[processor/k8sattributes] Remove stable feature gate k8sattr.rfc3339
1 parent 4bfdbfb commit 16d362f

File tree

2 files changed

+30
-16
lines changed

2 files changed

+30
-16
lines changed
Lines changed: 27 additions & 0 deletions
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: k8sattributesprocessor
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Remove stable feature gate `k8sattr.rfc3339`
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: [38810]
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/k8sattributesprocessor/internal/kube/client.go

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"time"
1414

1515
"go.opentelemetry.io/collector/component"
16-
"go.opentelemetry.io/collector/featuregate"
1716
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
1817
"go.uber.org/zap"
1918
apps_v1 "k8s.io/api/apps/v1"
@@ -30,14 +29,6 @@ import (
3029
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor/internal/metadata"
3130
)
3231

33-
var enableRFC3339Timestamp = featuregate.GlobalRegistry().MustRegister(
34-
"k8sattr.rfc3339",
35-
featuregate.StageStable,
36-
featuregate.WithRegisterDescription("When enabled, uses RFC3339 format for k8s.pod.start_time value"),
37-
featuregate.WithRegisterFromVersion("v0.82.0"),
38-
featuregate.WithRegisterToVersion("v0.102.0"),
39-
)
40-
4132
// WatchClient is the main interface provided by this package to a kubernetes cluster.
4233
type WatchClient struct {
4334
m sync.RWMutex
@@ -478,14 +469,10 @@ func (c *WatchClient) extractPodAttributes(pod *api_v1.Pod) map[string]string {
478469
if c.Rules.StartTime {
479470
ts := pod.GetCreationTimestamp()
480471
if !ts.IsZero() {
481-
if enableRFC3339Timestamp.IsEnabled() {
482-
if rfc3339ts, err := ts.MarshalText(); err != nil {
483-
c.logger.Error("failed to unmarshal pod creation timestamp", zap.Error(err))
484-
} else {
485-
tags[tagStartTime] = string(rfc3339ts)
486-
}
472+
if rfc3339ts, err := ts.MarshalText(); err != nil {
473+
c.logger.Error("failed to unmarshal pod creation timestamp", zap.Error(err))
487474
} else {
488-
tags[tagStartTime] = ts.String()
475+
tags[tagStartTime] = string(rfc3339ts)
489476
}
490477
}
491478
}

0 commit comments

Comments
 (0)