@@ -13,7 +13,6 @@ import (
13
13
"time"
14
14
15
15
"go.opentelemetry.io/collector/component"
16
- "go.opentelemetry.io/collector/featuregate"
17
16
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
18
17
"go.uber.org/zap"
19
18
apps_v1 "k8s.io/api/apps/v1"
@@ -30,14 +29,6 @@ import (
30
29
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor/internal/metadata"
31
30
)
32
31
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
-
41
32
// WatchClient is the main interface provided by this package to a kubernetes cluster.
42
33
type WatchClient struct {
43
34
m sync.RWMutex
@@ -478,14 +469,10 @@ func (c *WatchClient) extractPodAttributes(pod *api_v1.Pod) map[string]string {
478
469
if c .Rules .StartTime {
479
470
ts := pod .GetCreationTimestamp ()
480
471
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 ))
487
474
} else {
488
- tags [tagStartTime ] = ts . String ( )
475
+ tags [tagStartTime ] = string ( rfc3339ts )
489
476
}
490
477
}
491
478
}
0 commit comments