@@ -117,10 +117,10 @@ func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error {
117
117
118
118
func (u * InstrumentationUpgrade ) upgrade (_ context.Context , inst v1alpha1.Instrumentation ) * v1alpha1.Instrumentation {
119
119
upgraded := inst .DeepCopy ()
120
- for annotation , config := range u .defaultAnnotationToConfig {
120
+ for annotation , instCfg := range u .defaultAnnotationToConfig {
121
121
autoInst := upgraded .Annotations [annotation ]
122
122
if autoInst != "" {
123
- if config .enabled {
123
+ if instCfg .enabled {
124
124
switch annotation {
125
125
case constants .AnnotationDefaultAutoInstrumentationApacheHttpd :
126
126
if inst .Spec .ApacheHttpd .Image == autoInst {
@@ -144,8 +144,7 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru
144
144
}
145
145
}
146
146
} else {
147
- u .Logger .Error (nil , "autoinstrumentation not enabled for this language" , "flag" , config .id )
148
- u .Recorder .Event (upgraded , "Warning" , "InstrumentationUpgradeRejected" , fmt .Sprintf ("support for is not enabled for %s" , config .id ))
147
+ u .Logger .V (4 ).Info ("autoinstrumentation not enabled for this language" , "flag" , instCfg .id )
149
148
}
150
149
}
151
150
}
@@ -177,8 +176,7 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru
177
176
}
178
177
}
179
178
} else {
180
- u .Logger .Error (nil , "autoinstrumentation not enabled for this language" , "flag" , gate .ID ())
181
- u .Recorder .Event (upgraded , "Warning" , "InstrumentationUpgradeRejected" , fmt .Sprintf ("support for is not enabled for %s" , gate .ID ()))
179
+ u .Logger .V (4 ).Info ("autoinstrumentation not enabled for this language" , "flag" , gate .ID ())
182
180
}
183
181
}
184
182
}
0 commit comments