Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quiets some SUPER noisy logs #2812

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading