Skip to content

Commit

Permalink
Quiets some SUPER noisy logs (#2812)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronoff97 authored Apr 5, 2024
1 parent 9335ea6 commit a1f850b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion internal/manifests/collector/horizontalpodautoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
10 changes: 4 additions & 6 deletions pkg/instrumentation/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}
}
}
Expand Down Expand Up @@ -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())
}
}
}
Expand Down

0 comments on commit a1f850b

Please sign in to comment.