Skip to content

Commit 5c31bea

Browse files
committed
Quiets some SUPER noisy logs
1 parent fb23fde commit 5c31bea

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

internal/manifests/collector/horizontalpodautoscaler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func HorizontalPodAutoscaler(params manifests.Params) (*autoscalingv2.Horizontal
4444

4545
// defaulting webhook should always set this, but if unset then return nil.
4646
if params.OtelCol.Spec.Autoscaler == nil {
47-
params.Log.Info("hpa field is unset in Spec, skipping autoscaler creation")
47+
params.Log.V(4).Info("hpa field is unset in Spec, skipping autoscaler creation")
4848
return nil, nil
4949
}
5050

pkg/instrumentation/upgrade/upgrade.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error {
117117

118118
func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instrumentation) *v1alpha1.Instrumentation {
119119
upgraded := inst.DeepCopy()
120-
for annotation, config := range u.defaultAnnotationToConfig {
120+
for annotation, instCfg := range u.defaultAnnotationToConfig {
121121
autoInst := upgraded.Annotations[annotation]
122122
if autoInst != "" {
123-
if config.enabled {
123+
if instCfg.enabled {
124124
switch annotation {
125125
case constants.AnnotationDefaultAutoInstrumentationApacheHttpd:
126126
if inst.Spec.ApacheHttpd.Image == autoInst {
@@ -144,8 +144,7 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru
144144
}
145145
}
146146
} 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)
149148
}
150149
}
151150
}
@@ -177,8 +176,7 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru
177176
}
178177
}
179178
} 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())
182180
}
183181
}
184182
}

0 commit comments

Comments
 (0)