diff --git a/internal/manifests/collector/horizontalpodautoscaler.go b/internal/manifests/collector/horizontalpodautoscaler.go index 28b0b3cc52..1c6de43cae 100644 --- a/internal/manifests/collector/horizontalpodautoscaler.go +++ b/internal/manifests/collector/horizontalpodautoscaler.go @@ -44,7 +44,7 @@ func HorizontalPodAutoscaler(params manifests.Params) (*autoscalingv2.Horizontal // defaulting webhook should always set this, but if unset then return nil. if params.OtelCol.Spec.Autoscaler == nil { - params.Log.Info("hpa field is unset in Spec, skipping autoscaler creation") + params.Log.V(4).Info("hpa field is unset in Spec, skipping autoscaler creation") return nil, nil } diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index 30922711e6..3d7510b8cb 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -117,10 +117,10 @@ func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error { func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instrumentation) *v1alpha1.Instrumentation { upgraded := inst.DeepCopy() - for annotation, config := range u.defaultAnnotationToConfig { + for annotation, instCfg := range u.defaultAnnotationToConfig { autoInst := upgraded.Annotations[annotation] if autoInst != "" { - if config.enabled { + if instCfg.enabled { switch annotation { case constants.AnnotationDefaultAutoInstrumentationApacheHttpd: if inst.Spec.ApacheHttpd.Image == autoInst { @@ -144,8 +144,7 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru } } } else { - u.Logger.Error(nil, "autoinstrumentation not enabled for this language", "flag", config.id) - u.Recorder.Event(upgraded, "Warning", "InstrumentationUpgradeRejected", fmt.Sprintf("support for is not enabled for %s", config.id)) + u.Logger.V(4).Info("autoinstrumentation not enabled for this language", "flag", instCfg.id) } } } @@ -177,8 +176,7 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru } } } else { - u.Logger.Error(nil, "autoinstrumentation not enabled for this language", "flag", gate.ID()) - u.Recorder.Event(upgraded, "Warning", "InstrumentationUpgradeRejected", fmt.Sprintf("support for is not enabled for %s", gate.ID())) + u.Logger.V(4).Info("autoinstrumentation not enabled for this language", "flag", gate.ID()) } } }