@@ -72,43 +72,43 @@ type CustomFeatures interface {
72
72
// ExtractFeatures fields that containing a tracking tag will be tracked.
73
73
// Automatic collection of bool or int fields. Any value that exists on tracking
74
74
// tag will be used instead of value from UnifiedConfig.
75
- func ExtractFeatures (ctx context.Context , uc * UnifiedConfig ) ([]Feature , error ) {
76
- allFeatures := getOverriddenDefaultPipelines (uc )
77
- allFeatures = append (allFeatures , getSelfLogCollection (uc ))
78
- allFeatures = append (allFeatures , getOTelLoggingSupportedConfig (ctx , uc ))
75
+ func ExtractFeatures (ctx context.Context , userUc , mergedUc * UnifiedConfig ) ([]Feature , error ) {
76
+ allFeatures := getOverriddenDefaultPipelines (userUc )
77
+ allFeatures = append (allFeatures , getSelfLogCollection (userUc ))
78
+ allFeatures = append (allFeatures , getOTelLoggingSupportedConfig (ctx , mergedUc ))
79
79
80
80
var err error
81
81
var tempTrackedFeatures []Feature
82
- if uc .HasMetrics () {
83
- tempTrackedFeatures , err = trackedMappedComponents ("metrics" , "receivers" , uc .Metrics .Receivers )
82
+ if userUc .HasMetrics () {
83
+ tempTrackedFeatures , err = trackedMappedComponents ("metrics" , "receivers" , userUc .Metrics .Receivers )
84
84
if err != nil {
85
85
return nil , err
86
86
}
87
87
allFeatures = append (allFeatures , tempTrackedFeatures ... )
88
88
89
- tempTrackedFeatures , err = trackedMappedComponents ("metrics" , "processors" , uc .Metrics .Processors )
89
+ tempTrackedFeatures , err = trackedMappedComponents ("metrics" , "processors" , userUc .Metrics .Processors )
90
90
if err != nil {
91
91
return nil , err
92
92
}
93
93
allFeatures = append (allFeatures , tempTrackedFeatures ... )
94
94
}
95
95
96
- if uc .HasLogging () {
97
- tempTrackedFeatures , err = trackedMappedComponents ("logging" , "receivers" , uc .Logging .Receivers )
96
+ if userUc .HasLogging () {
97
+ tempTrackedFeatures , err = trackedMappedComponents ("logging" , "receivers" , userUc .Logging .Receivers )
98
98
if err != nil {
99
99
return nil , err
100
100
}
101
101
allFeatures = append (allFeatures , tempTrackedFeatures ... )
102
102
103
- tempTrackedFeatures , err = trackedMappedComponents ("logging" , "processors" , uc .Logging .Processors )
103
+ tempTrackedFeatures , err = trackedMappedComponents ("logging" , "processors" , userUc .Logging .Processors )
104
104
if err != nil {
105
105
return nil , err
106
106
}
107
107
allFeatures = append (allFeatures , tempTrackedFeatures ... )
108
108
}
109
109
110
- if uc .HasCombined () {
111
- tempTrackedFeatures , err = trackedMappedComponents ("combined" , "receivers" , uc .Combined .Receivers )
110
+ if userUc .HasCombined () {
111
+ tempTrackedFeatures , err = trackedMappedComponents ("combined" , "receivers" , userUc .Combined .Receivers )
112
112
if err != nil {
113
113
return nil , err
114
114
}
@@ -439,7 +439,8 @@ func getMetadata(field reflect.StructField) metadata {
439
439
}
440
440
}
441
441
442
- func getOTelLoggingSupportedConfig (ctx context.Context , uc * UnifiedConfig ) Feature {
442
+ // TODO: b/399354366 - Cleanup when OTel Logging Support is fully released.
443
+ func getOTelLoggingSupportedConfig (ctx context.Context , mergedUc * UnifiedConfig ) Feature {
443
444
feature := Feature {
444
445
Module : "logging" ,
445
446
Kind : "service" ,
@@ -448,7 +449,7 @@ func getOTelLoggingSupportedConfig(ctx context.Context, uc *UnifiedConfig) Featu
448
449
Value : "false" ,
449
450
}
450
451
451
- if uc .OTelLoggingSupported (ctx ) {
452
+ if mergedUc .OTelLoggingSupported (ctx ) {
452
453
feature .Value = "true"
453
454
}
454
455
0 commit comments