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
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
Quiets some SUPER noisy logs
jaronoff97 committed Apr 4, 2024
commit 5c31beadb88e1a84a6b413cd0549cd28fcef8557
2 changes: 1 addition & 1 deletion internal/manifests/collector/horizontalpodautoscaler.go
Original file line number Diff line number Diff line change
@@ -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
}

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